Indentation is critical to finding errors. If you are using an
IDE (e.g. Eclipse) it more than likely has a built in code formatter. In Eclipse you select the code you want to format and press Ctrl-Shift-F. If you are not using an IDE then you may want to check out the post for
Indentify, a rudimentary indenter.
In
java you are not permitted to define one method inside another method.