I'm brand new to JavaRanch, but I've found a lot of useful info here prior to joining. I'm preparing for the OCPJP/SCJP 6.0 exam, and after going completely through the S&B Java 6 Study Guide(over several months), I just started with the Practice Exams book. I just finished Assessment Test 1, and got stumped on an inheritance issue by the last question:
This code will not compile because MyPancake.doStuff() must be marked public. I can't figure out why that would be. 1) The <default> access modifier is not more restrictive than the inherited method, and 2) the MyPancake.doStuff() method is being called from its own class, and certainly not from some class in a different package. Any help here?