Can you use the javac compiler to get an error message that says what the problem is?

BTW The posted code has lost its formatting. Nested statements should be indented.