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 difference between Eclips and MyEclips?
Catch(Exception e){ } in that what is Exception and purpose of that in that place exactly?
What are the disadvantages of using inner classes?
Why chararray() is preferred over string to store the password?
What are the types of statement? explain
What is continuity of a function?
Difference between Hash Table and Hash Map?
Can we use synchronized block for primitives?
What is meant by stack and queue?
what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent
Can a static method be overridden in java?
Explain method overloading and overriding?