help in fixing the error

hi.....i have finished the program that determines if the students fails or not..according to the grades.....well....i have an error..i dont know how to overcome it...it says " class expexted...here is the code :

System.out.println("students under A:"+acount); System.out.println("students under B:"+bcount); System.out.println("students under C:"+ccount); System.out.println("students under D:"+dcount); System.out.println("students under F:"+fcount);

Here's a hint for debugging your own code, or anybody else's: Always look for typographical errors first because they seem to be by far and away the most common cause of a program not compiling and sometimes of runtime errors too. [ October 29, 2004: Message edited by: Jeff Bosch ]

Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)

Once you have sorted out all the typos and spelling in your code, you still have a problem with your grading algorithm: you are trying to do s.grade == 'A' etc. This will not work as you are trying to compare a String (grade) with a char primitive 'A'. These are incompatible types and cannot be compared by using the comparison operator ==.

You want to do something like: s.grade.equals("A"), this should work better. Apart from that, I can't see too many compiler errors with your code, except I'm not sure that the counting methods you are using are doing what you want.