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

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
ETS User

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

Post 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");
}

admin
Site Admin
Posts: 10065
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 227 guests