Question 13
Answer saved
Flag
question
class A {
void sum(int x, int y){
}
System.out.println("Sum of two numbers: " +(x+y));
void sum(int x, int y, int z){
}
System.out.println("Sum of three numbers: " +(x+y+z));
public static void main(String[] args) {
A a = new A();
a.sum (20, 30);
a.sum (30, 40, 50);
}
}
O A. The program will run indefinitely without producing any output.
B. Sum of two numbers: 50
Sum of three numbers: 120
OC. The program has a compilation error
OD. Sum of two numbers: 50
Sum of three numbers: 90
Clear my choice