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
Why do people says “java is robust”?
What is the use of :: in java?
From the two, which would be easier to write: synchronization code for ten threads or two threads?
v-model life cycle
What an i/o filter?
What is the difference between equals() and?
How to change value in arraylist java?
How we can run a jar file through command prompt in java?
What does opcode mean?
Is an object null?
Explain how to force the garbage collection in java.
What will be the initial value of an object reference which is defined as an instance variable?
How is Object Oriented Programming different from Procedure Oriented Programming?
What is purpose of applet programming?
Explain how to convert any java object into byte array.