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
What is string builder?
What is object class in java?
What is compareto () in java?
What causes memory leak in java?
Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?
What is method in research paper?
What are scriptlets?
What is %02d?
What does function identity () do?
Is java ee a framework?
Is a char always 1 byte?
What is the tradeoff between using an unordered array versus an ordered array?
Realized?
What is pojo class in java?
Explain the difference between abstract classes and interfaces in java?