what is the difference between equals method and ==
Answer Posted / devarathnam c,kotagudibanda(po
Hi...
"equals()" method always compares the content of an
object,but "==" operator compares the memory locations
(references).
eg: String s1="KOTAGUDIBANDA";
Where "s1" is a reference and "KOTAGUDIBANDA"is a content.
| Is This Answer Correct ? | 6 Yes | 6 No |
Post New Answer View All Answers
Can we have any code between try and finally blocks?
Explain tree set and its features?
What is meant by method?
What's the difference between an abstract class and interface in java?
What is a memory leak in java?
What is primitive array?
What is nextint java?
Which keyword specify that a variable is effectively final ?
How do you sort in java?
How do you implement polymorphism in our day to day life?
What is difference between variable declaration and definition?
What is the reflection?
What is predicate in java?
What is use of functional interface in java 8? Explain
Is void a type?