Which of the following statements can be inserted in the ___ line so that the code will compile successfully? (Choose all that apply)
public interface Printable {} public class Rectangle implements Printable { public static void main(String[] args) { ____ frog = new RoundRectangle(); } } public class RedRoundRectangle extends Rectangle {} public class RoundRectangle extends Rectangle {}
A, B, D, E.
The ___ can be filled with any class or interface that is a supertype of RoundRectangle.
A is a superclass of RoundRectangle, and B is the same class, so both are correct.
RedRoundRectangle is not a superclass of RoundRectangle, so C is incorrect.
RoundRectangle inherits the Printable interface, so D is correct.
All classes inherit Object, so E is correct.
Long is an unrelated class that is not a superclass of RoundRectangle, and is therefore incorrect.