• Post Reply Bookmark Topic Watch Topic
  • New Topic

equals  RSS feed

 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


true
false
false

Couldn't figure out, why equals is not working ?
 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!