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 are static blocks in java ?
Define an applet in java?
when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???
What is the concept of multithreading?
What is volatile keyword in java
Are registers volatile?
How java is similar to c?
In the below example, what will be the output?
Is there any difference between synchronized methods and synchronized statements?
What is ctrl m character?
why using interface interface ?
What is the difference between normal report & matrix report?
What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?
Is oracle charging for java?
How does list work in java?