Float t=new Float(0.9F); Float s=new Float(0.9F); Double u=new Double(0.9); which statements evaluates true? A.s==t B.s.equals(t) C.s==u D.t.equals(u) [ February 10, 2003: Message edited by: Mellihoney Michael ]
a beginner in java
Joined: Nov 12, 2002
t and s are equals but not ==. the other is neither equals nor ==
ciao<br />Igor Zeta<br />SCJP1.4
Joined: Jan 22, 2003
s.equals(t) will work since s.equals(t) will compare the values. s == t will compare the objects in the heap. s == u will generate a compilation error. t.equals(u) are not equals since the values are different.