whats the difference between == and .equal ?
Answer Posted / deepak sharma
== compares the object refrences to see if they refer to the
same object in memory.
where as
.equals compares the content of object to see if the object
content is same. Most of the times it is used to compare the
String Object. It can be used to compare other Objects too.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why should I use abstract class?
Differentiate between array list and vector in java.
What is private protected in java?
Does java isempty check for null?
What is the difference between hashmap and hashtable? What is an interface?
Does java support multiple inheritances?
Can you explain the meaning of aggregation and composition
What is meant by object oriented programming – oop?
How do generics work?
What is the difference between && and & in java?
What does it mean to be immutable?
Write a program to check string is palindrome without using loop?
Differentiate jar and war files?
What is included in core java?
Why constructor has no return type?