• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Deepak's mock exam simulator

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic