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 reverse function?
What is the exact difference in between unicast and multicast object? Where we will use?
Describe what a thread-local variable is in java?
How do you check if two given string are anagrams?
Which class contains a method: cloneable or object?
What is the primary benefit of encapsulation?
What is a numeric format?
Why should I use abstract class?
What is a method type?
Is it safe to install java on my computer?
How do you do absolute value in java?
What is the right data type to represent a price in java?
Will the compiler creates a default constructor if I have a parameterized constructor in the class?
What is methods in java?
Explain public static void main(string args[]) in java.