posted 7 years ago
The nice thing about the compiler is that it tells you (usually) where the problem is. If the compiler prints out "error", the compiler pretty much gave up trying to make your .class file. Regardless of what you think, it's not right.
Here's a big hint though...if it ever prints out more than one error, ignore ALL the errors but the first one. Fix it, then re-compile. Much of the time, making one error confuses the parser, and it just gets more and more confused until it gives up and reports lots of errors. But the thing is, if you fix the first one, a lot of the time that will un-confuse the parser, and it can then do a better job of reporting the next error. Sometimes fixing the one error (like a missing curlie bracket) can fix ten reported errors...
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors