Given:
1. interface Printable { 2. void print(); 3. } /*from w w w . j a va 2 s.co m*/ 4. abstract class Shape implements Printable { } 5. 6. class Rectangle implements Shape { 7. public void print() { ; } 8. } 9. class Square extends Rectangle { 10. void print(int s) { ; } 11. }
Which are true? (Choose all that apply.).
D is correct.
Classes extend abstract classes, they don't implement them.
The method on line 10 doesn't need to be declared public because it's an overload of the parent method, not an override.