Page 1185 - AP Computer Science A, 7th edition
P. 1185

12. (A) Declaration I works because a Portrait is-a DigitalPicture, and it will be assigned the default constructor from Picture, its superclass. Declaration II fails because a Picture is not a Landscape. Declaration III fails because you can’t create an instance of an interface.


































































































   1183   1184   1185   1186   1187