What is difference between “==” and equals()?
“==”: 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 |
Can you inherit a constructor java?
Where is jre installed?
Why is it called a string?
what is the meaning of java.lang and java.util
can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread
What is the private method modifier?
What is java beans?
What is the use of coding?
What is the common usage of serialization?
what is platform independence in java?
What if static is removed from main method?
What is the core java?