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 |
What is append in java?
what is object-oriented programming in java?
what us Dyna action form?
4 Answers Aithent Technologies,
What is java english?
State the difference between strings and arrays.
how to create constants in java?
Which non-unicode letter characters may be used as the first character of an identifier?
what is business objects?
class A { class B { psvm(String args[]) { } } } if the prg saved in A.java whats the o/p?
What are the important features of Java 8 release?
. Explain Java String Pool.
why we r not use pointers in corejava?