Formatting, indents, fixing syntax errors

I've corrected your code providing:
 - a better formatting
 - adding 4 spaces indents
 - fixing missing bracket

Also, I renamed the file `code` into `code.java`.