This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
What does 'class' or 'interface' expected error mean?
I tried to follow advice about having separate variables --one static and one not-- so that my student id would increment, and now my class file that compiled before won't compile and I get that error. Then I removed the getter/setter for the student id instance variables.
Feel like I've taken steps back because I can't continue to work on my Student Test file until this Student class file compiles again.
I'm trying different things and getting nowhere...please help.
Working on this for two days and feeling stupider by the moment.
This is a bit too much code for me to look at right now, but I'll tell you what the error message means: it means that after the first class definition in a file, the compiler found something besides the words "class" or "interface" . This almost always a "}" character. The real problem is just that your curly braces aren't balanced -- you've got an extra close-brace at the end of your class.
Using a good programmer's editor is the best way to avoid this kind of problem, by the way -- the editor would show you the problem immediately by pointing out the non-matching braces.