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 would you format a date in java? I.e. In the ddmmyyy format?
What is the difference between Java1.4 and Java1.5
Print Vertical traversal of a Binary Tree.
Can we access instance variables within static methods ?
What is the buffer limit?
How do you create an array in java?
Explain covariant method overriding in java.
What interface is extended by awt event listeners?
Write code of any action class?
What kind of variables a class can consist of?
What Is Composition?
What is the purpose of java?
What are disadvantages of java?
What will be the initial value of an object reference which is defined as an instance variable?
Difference between method overloading and method overriding in java ?