Review Questions |
6.27 |
Given the following code, which statements are true?
public interface HeavenlyBody { String describe(); } class Star { String starName; public String describe() { return "star " + starName; } } class Planet extends Star { String name; public String describe() { return "planet " + name + " orbiting star " + starName; } } Select the two correct answers:
|
Get Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.