Multiple Choice Question

Quiz Guidelines

 

QID: 
498
Question: 

What should be placed in the two blanks so that the following code will compile without errors:

class XXX{
public void m() throws Exception{
throw new Exception();
}   }class YYY extends XXX{
public void m() {
}   }public class TestClass {
public static void main(String[] args) {
______ obj = new ______();
obj.m();
}   }

Select 1 option

A. XXX and YYY
B. XXX and XXX
C. YYY and YYY
D. YYY and XXX
E. Nothing will make the code compile.

Q&A Set: