what is the difference between equals method and ==

Answer Posted / sriragv

equal method also indirectly use == method i.e hashcode
(),there will be no difference b/w equals and == unless
until u override the equal method

Let me know if iam wrong

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define reflection.

575


When to use runnable interface vs thread class in java?

516


What does 3 dots mean in java?

514


What is difference between adapter class and listener?

495


In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?

572






What is java instanceof operator?

559


Which collection is ordered in java?

531


How is it possible for two string objects with identical values not to be equal under the == operator?

523


Explain the different forms of polymorphism?

565


I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?

572


What are different types of expressions?

552


How do you create a reference in java?

508


What is java string pool?

539


What is the difference between length and size in java?

494


What is the difference between the paint() and repaint() methods in java programming?

621