Given the code
fragment:
Boolean b1 = true;
Boolean b2 = false;
int i = 0;
while (foo) {}
Which one is
valid as a replacement for foo?
A.
b1.compareTo(b2)
b1.compareTo(b2)
B.
i = 1
i = 1
C.
i == 2? -1:0
i == 2? -1:0
D.
“foo”.equals(“bar”)
“foo”.equals(“bar”)
Risposta D : ci vuole un valore booleano
Nessun commento:
Posta un commento