Formatting, indents, fixing syntax erros

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`.