Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

isinstanceOf/ equals

 
aakash bhatt
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Diff of isinstanceOf and equals method in Object
Regards,
aakash
 
popoe shi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
isinstanceOf:check this object is belog to some class
equals:to compare the object value
Right?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
instanceOf : Checks whether a class in an instance of a class or implememnts a interface.
equals : Checks whether an object equals another object as per the rules defined in the equals method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic