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.
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 ??