Given the code fragment: Which one is valid as a replacement for foo?
A.
b1.compareTo(b2)
B.
i = 1
C.
i == 2? -1 : 0
D.
“foo”.equals(“bar”)
Explanation:
Given the code fragment: Which one is valid as a replacement for foo?
A.
b1.compareTo(b2)
B.
i = 1
C.
i == 2? -1 : 0
D.
“foo”.equals(“bar”)
Explanation: