Which of the following can be inserted into Rectangle to make this code compile? (Choose all that apply)
class ExceptionA extends Exception {} class ExceptionB extends RuntimeException {} interface Printable { void output() throws ExceptionA; } class Rectangle implements Printable { // INSERT CODE HERE }
A, C, D, E.
output() can throw no exceptions so A correct.
output() cal also throw runtime exceptions so D and E correct.
C is correct since it matches the signature in the interface.