(Choose 1 answer)
class Output {
What will be the output of the following Java program?
public static int sum(int... x) {
int sum = 0;
A. 30
for (int xx: x) {
B. Compiler error
C. 10
sum += xx;
}
return sum;
D. 10, 10, 20
}
public static void main(String args[]) {
sum(10);
sum(10, 20);
System.out.println(sum(10, 20));