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 |
Name the immediate superclass of the MenuComponent class?
while creating thread why we extend thread class
Which data type is a class in java?
what is diff bet iterator and enumeration?
Explain the importance of finally block in java?
why static class in java or what is use of static class in java
What is keyword and identifier?
What is main difference between variable and constant?
What is boolean data type in java?
What is the purpose of an interface?
What is a priority queue java?
What are loops in java?