11. static class A {
12. void process() throws Exception { throw new Exception();
}
13. }
14. static class B extends A {
15. void process() { System.out.println(”B”); }
16. }
17. public static void main(String[] args) {
18. new B().process();
19. }
What is the result?
1 B
2 The code runs with no output.
3 Compilation fails because of an error in
line 12.
4 Compilation fails because of an error in
line 15.
Answer Posted / neil
B
| Is This Answer Correct ? | 15 Yes | 4 No |
Post New Answer View All Answers
What is another word for methodology?
Which method must be implemented by all threads?
Write a program to print fibonacci series
What flag up means?
What does it mean that a method or field is “static”?
What is slash r?
What is the meaning of 3 dots in java?
What is xslt in java?
What data type is a string?
What is consumer in java?
Explain the scope of a variable.
What is a “stateless” protocol ?
What is the common usage of serialization?
Is empty in java?
Who developed java?