whats the difference between == and .equal ?
Answer Posted / jai
== this is equal to it mainly compares only the values of
the object if both are equal it returns true or else false
eg. a=10,b=20
if (a==b)
it will return false
for the same case it will return false for .equals since
.equals will check only that the objects refr to the same
reference (address) of the instance
clear
| Is This Answer Correct ? | 1 Yes | 10 No |
Post New Answer View All Answers
What is size () in java?
What is difference between iterator access and index access?
What do you understand by casting in java language?
Is it possible to override private or static method in java?
What is boolean keyword in java?
What is an immutable class?
What is java instanceof operator?
What is scope & storage allocation of static, local and register variables? Explain with an example.
How do you create a sop?
What is stringreader?
What is meant by JVM? Is JVM platform independent or not?
Explain the selection sort algorithm?
What is the purpose of the wait(), notify(), and notifyall() methods in java programming?
How does java enable high performance?
What is string pool in java?