what is the difference between equals method and ==

Answer Posted / anoop

Normally == using to compare value type. If 2 object is
refering same memmory, it will return true otherwise false

Comparing object , you have to use equals, bz it will
compare all the values in it.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain the cs option of java interpreter?

504


worst case complexities of Quick sort and Merge sort.

598


What are the differences between processes and threads?

510


Can we extend singleton class in java?

541


Describe the term diamond problem.

573






Is nullpointerexception checked or unchecked?

549


What is finally in Java?

575


Implement a stack with push (), pop() and min() in O(1) time.

626


Why singleton class is used in java?

566


How does enum work in java?

542


Why packages are used?

543


What is the relationship difference the canvas class and the graphics class?

560


What is compareto () in java?

535


What is the difference between equals() and?

583


How do you download stubs from Remote place?

1352