why the equals method can be override?when we override the
equals method?
Answer Posted / subhareddy
equals method available in object class is for address
comparison not for content comparison.so for content
comparison we have to override equals method in our class.
wrapper classes and string class has overridden equals
method for content comparison.
| Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
What is difference between class and object in java?
In which order the iterator iterates over collection?
What is a nested class?
What is string and example?
Which class represents the socket that both the client and server use to communicate with each other?
What is int lol?
What environment variables are required to be set on a machine in order to run Java programs?
What is passing value java?
Is object a data type in java?
What language is pass by reference?
What is scope of a variable?
What is class variable java?
In Java list the methods that can be overridden?
What is the purpose of garbage collection in java? When is it used?
What is oops in java?