If set accepts only one argument then how can it compare
two objects to avoid duplicates
Answer Posted / ashutosh
for comparison between two objects of the same class, class
must override equals() and hashcode() methods of the object
class.
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What are the three best choices for a development environment?
What does compareto () do in java?
What is the right data type to represent a price in java?
What is java object name?
What is bytecode verifier?
What is map java?
Why arraylist is not synchronized in java example?
Explain constructors and types of constructors in java.
Which api is provided by java for operations on set of objects?
Why is inheritance used in java?
Is there is any difference between a scrollbar and a scrollpane?
How to retrieve data from database in java using arraylist?
What is a two-pass assembler?
What ide should I use for java?
What is the main method java?