Question 15
Not yet
answered
class A {
}
Flag question
void sum(int x, int y){
System.out.println("Sum of two numbers: "+(x+y));
void sum(int y, int x){
}
System.out.println("Sum of three numbers:
+(x+y));
public static void main(String[] args) {
A a = new A();
}
a.sum(20, 30);
}
O A. The code has a syntax error due to incorrect method calls.
O B. The code has a runtime error in the main method.
O C.
The code has a compilation error due to an undeclared class.
OD. The code has a duplicate method error.