How to eliminate duplicates from an array?
Answer Posted / edward sudhaharchennai
Unlike other implementations of the collection interface,
implementation of the Set intrface do not allow duplicate
elements. This also means that a set can contain at most
one null value. The set interface does not define any new
methods, and its add() and addAll() methods will not store
duplicates. If an element is not currently in the set, two
consecutive calls to the add() method to insert the element
will first return true then false...........
Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
How to make object serializable in java?
What is equlas() and hashcode() contract in java? Where does it used?
How will you add panel to a frame?
difference between byte stream class and character stream class?
What is the memory leak in java?
What is the function of static in java?
What is method in java with example?
How do constructors use this() and super()?
What is the default value of byte datatype in java?
Can java list be null?
What is replacefirst in java?
What does replaceall do in java?
What is a nonetype?
What is garbage collection? Can it be forced to run?
Why main function is static?