This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes equals Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "equals " Watch "equals " New topic
Author

equals

meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 225



true
false
false

Couldn't figure out, why equals is not working ?


OCAJP
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32689
    
    4
Some poor code style there. Your two return statements are confusing. It should read:- You should not use tabs for indenting, as explained here.
You should always put the @Override annotation on overridden methods, like this, and compile the code again:- That will probably help explain why your method is not working.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: equals
 
Similar Threads
question concering hashCode(), equals() and operator ==
Overriding Equals??
about == and equals()
Question on Object and equals
equlas()