Programmer Programmer - 1 month ago 6
Java Question

Error in Java. Something to do with Brackets

LINK TO CODE IMAGE

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(test.java:34)
[enter image description here][1]

Answer

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