posted 22 years ago
One of my friends ask me the following question:
Given:
Integer i = new Integer(15);
Long l = new Long(15);
Double d = new Double(15.0);
Which two expressions evaluate to True? (Choose Two)
A. (i == l)
B. (i == d)
C. (d == 1)
D. (i.equals(d))
E. (d.equals(i))
F. (i.equals(15))
The answer is D & E. But I tested, both D & E returned false, so it seems there is no correct answer in this question.
Am I right?