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
What is an immutable class? How to create an immutable class?
Explain the difference between serializable and externalizable in java?
What is an iterator interface in java programming?
How do you use substring in java?
Define packages in java?
How do you add spaces in java?
What is structure of java heap? What is perm gen space in heap?
I want to persist data of objects for later use. What’s the best approach to do so?
Can we extend immutable class?
What is serialversionuid?
What are loops in java? What are three types of loops?
What is main difference between variable and constant?
How does a cookie work in Servlets?
What is == mean?
What is the relationship between clipping and repainting under awt?