What is the result?

Given:
1. public class A {
2. public void doit() {
3. }
4.
5. public String doit() {
6. return "a";
7. }
8.
9. public double doit(int x) {
10. return 1.0;
11. }
12.}
What is the result?
A. An exception is thrown at runtime.
B. Compilation fails because of an error in line 9.
C. Compilation fails because of an error in line 5.
D. Compilation succeeds and no runtime errors with class A occur.

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.