aspose file tools
The moose likes Mock Exam Errata and the fly likes Deepak's mock exam simulator Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Mock Exam Errata
Reply Bookmark "Deepak Watch "Deepak New topic
Author

Deepak's mock exam simulator

Shweta
Greenhorn

Joined: Oct 28, 2000
Posts: 2
One of the options in the qs.
"which of the foll is true"
says (this is the answer given)
"equals() provide deep comparison and == provides shallow comparison"
But,actually equals() & == provide the same comparison unless overridden to do otherwise or in case of boolean & string .
kindly show me the light if wrong...
regds,
shwe
[This message has been edited by Shweta (edited October 29, 2000).]
Eric Boehme
Greenhorn

Joined: Oct 19, 2000
Posts: 3
In the RHE book, they refer == as a shallow comparison, because it just does a memory address comparison, whereas equals() is an overidden method in a class extended from Object (the source of the equals() method), and thus does a deeper level comparison.


Eric Boehme, Co-Founder The Java Information Group<br /> <br />"Only those who dare to fail greatly can ever achieve greatly." Robert Francis Kennedy
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
Shweta,
We have a naming policy here at the Ranch and your name is not a valid user name. Could you pleae re-register with a more appropriate name. Check here for more infor http://www.javaranch.com/names.jsp
Thanks for your posts,
Bill
 
 
subject: Deepak's mock exam simulator
 
Threads others viewed
equals
hashCode Question
How to equal same class objects
Jxam question on Equals Method
equals() method and == operator
developer file tools