This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "equals " Watch "equals " New topic
Author

equals

meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305



true
false
false

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


My one regret in life is that I am not someone else.
- Woody Allen
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37941
    
  22
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://aspose.com/file-tools
 
subject: equals
 
Similar Threads
equlas()
Overriding Equals??
Question on Object and equals
about == and equals()
question concering hashCode(), equals() and operator ==