where is .equals() method and how is it different from ==
operation <giving some confusing implementation> Is hashing
related to these?

Answer Posted / esha prasad

.equlas() method is in Object class which compares two
objects and returns true if both are same.

== compares whether two references pointing to same memory
location.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is identifier with example?

789


Will the jvm load the package twice at runtime?

813


What is a lightweight component?

787


What does s mean in regex?

739


why using interface interface ?

1757


Is java platform independent?

754


How will you reverse a link list without using recursion?

778


what is method reference in java 8?

759


Why stringbuffer is faster than string?

767


What is assembly language?

719


What is method reference?

704


How does varargs work in java?

829


What are basic keywords?

777


Can we override constructor?

760


What is the size of boolean variable?

809