Answer Posted / javamasque
“==”: It compares references (memory locations). It does not compares values in the memory location. Hence it is not recommended to find the equality of two objects. It is mostly used to compare primitive types.
equals(): It is used to find the equality of two objects. It actually compares with the values that an object contains.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Can we convert integer to string in java?
Can you explain the final method modifier?
Why java is used everywhere?
What are the restrictions that are applied to the java static methods?
How to create a base64 decoder in java8?
How do you implement singleton class?
What is externalizable?
What is are packages?
Difference difference paint() and paintcomponent()?
What is integer parseint?
Explain the difference between runnable and callable interface in java?
Is string is a keyword in java?
What is string syntax?
Explain about anonymous inner classes in java?
Implement 2 stacks with just 1 array. The stack routines must not indicate overflow unless every slot in array is used.