Page 1 of 1

[HD Pg 316, Sec. 9.2.3 - impact-of-access-modifiers-on-abstract-and-final]

Posted: Sun Jan 06, 2019 11:47 am
by Username987654
What if the recline method were protected or default? It would have been ok in that case because it is possible for a subclass to inherit methods with protected and default access.
I think that the text may be "isolating concerns" here, but I would respectfully argue that "some" may be perplexed when they see:

$javac Sofa.java
Sofa.java:1: error: Sofa is not abstract and does not override abstract method recline() in Sofa
public class Sofa{
^
1 error

Re: [HD Pg 316, Sec. 9.2.3 - impact-of-access-modifiers-on-abstract-and-final]

Posted: Sun Jan 06, 2019 10:14 pm
by admin
You are right. It should be declared abstract. Added to errata.
thank you for your feedback!