class X {
static void m(int[] i) {
i[0] += 7;
}
public static void main(String[] args) {
int[] j = new int[1];
j[0] = 12;
m(j);
System.out.println(j[0]);
}
}
What is the
result?
A.
7
7
B.
12
12
C.
19
19
D.
Compilation fails.
Compilation fails.
E.
An exception is thrown at run time
An exception is thrown at run time
Rispota C: 19
Nessun commento:
Posta un commento