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 |
1) Find the Merge point of two linked lists. 2) Swap two bits of integer. 3) Reverse individual words of the sentence. 4) Reverse string without using temp string.
Why are the objects immutable in java?
Difference between concurrent hashmap and hashtable and collections
What is bytecode verifier?
Why are the methods of the Math class are static?
Is singleton a bad practice?
Is there a jre for java 11?
What are the 6 functions?
write a code, we have two thread, one is printing even no and other print the odd no.
Which is easier .net or java?
Why can we not override static method?
Define iterator and methods in iterator?