Page 1 of 1

About Question com.enthuware.ets.scjp.v6.2.160 :

Posted: Thu Oct 27, 2011 12:15 pm
by ETS User
If the class is Integer, then:

public static void main(String[] args){
Integer tlk=2;
Integer klt=2;
if(tlk==klt)
System.out.println("tlk is equal to klt");
}

Re: About Question com.enthuware.ets.scjp.v6.2.160 :

Posted: Thu Oct 27, 2011 8:18 pm
by admin
This is not a valid scenario because the question clearly says, "o1 and o2 denote two object references to two different objects of same class."

So the given answer is correct.