Card 9 / 13: 3. class SubException extends Exception { } 4. class SubSubException extends SubException { } 5. 6. public class CC { void doStuff() throws SubException { } } 7. 8. class CC2 extends CC { void doStuff() throws SubSubException { } } 9. 10. class CC3 extends CC { void doStuff() throws Exception { } } 11. 12. class CC4 extends CC { void doStuff(int x) throws Exception { } } 13. 14. class CC5 extends CC { void doStuff() { } } What is the result? (Choose all that apply.)
A)
Compilation succeeds
B)
Compilation fails due to an error on line 8
C)
Compilation fails due to an error on line 10
D)
Compilation fails due to an error on line 12
E)
Compilation fails due to an error on line 14
Answer:
C) Compilation fails due to an error on line 10
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|