You see this error message because of any one of the followings:
1. You misspelled the keyword class (fully lower case) or you did not write it at all for writing your class.
public Class Test //actual keyword is class
{
public void myMethod()
{
System.out.println("class, interface, or enum expected?");
}
}
In the above example Class (C is in upper case) is written instead of class (fully lower...
Read More