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


Please Help Members By Posting Answers For Below Questions

Why does java doesnt suuport unsigned values?

1784


What is sorting in java?

518


Tell us something about different types of casting?

505


String class is defined under which package in java?

606


Can there be an abstract method without an abstract class?

523






How do you check if a number is a perfect square?

506


What are filterstreams?

594


Write a program to print fibonacci series

600


Why are generics used?

512


What is the difference between length and length() method in java?

631


How many types of threads are there in java?

492


What sorting algorithm does javascript use?

520


how to create daemon thread in java?

593


What is the use of default method in interface in java? Explain

532


What defines function?

527