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
Can we make constructors static?
What is ++ a in java?
What is the main purpose of java?
What are the restrictions imposed by a Security Manager on Applets?.
What is the formula to calculate percentage?
What is pass by value?
Can we override data members in java?
What do you mean by of string::valueof expression in java 8?
How does a cookie work in Servlets?
Why java strings are immutable in nature?
What is jit compiler ?
What is void in java?
Is array size fixed in java?
Which sorting is used in arrays sort in java?
Explain the difference between comparator and comparable in java?