first you are missing a semi colon. try to find it. second if you put this semicolon back the output is not easy the output is : Cannot find symbol symbol : method printDifficulty() location: class SCJPExam myExam.printDifficulty();
with inheritance the output is easy. the method in protected so it can be inherited. what about the member variable ? does the subclass has 2 variables with the same name and 2 different values ??? or is it just that the method access the member in its class first ??