Programmer Programmer - 1 year ago 78
Java Question

Error in Java. Something to do with Brackets


I keep getting this error on the code I've written. It's something to do with the brackets. I'm still new to coding so can someone help me out with this? Thanks.

This is the error:

Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Syntax error, insert "}" to complete ClassBody
at test.main(
[enter image description here][1]

Answer Source

Remove the semi colon you've placed next to your if condition where you check the year. If conditions cannot have semi colons.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download