How to eliminate duplicates from an array?

Answer Posted / vijaya bhaskar teegala

use linkedHashSet.It will maintain the insertion order

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by collection in java?

534


Can you give few examples of final classes defined in java api?

550


Explain when noclassdeffounderror will be raised ?

607


What is a treeset class?

546


What is hashmap and map?

543






How many digits can a float hold?

525


What is parse method?

527


Can we start a thread twice in java?

504


What environment variables do I need to set on my machine in order to be able to run java programs?

595


what is bmg file and how to create that files?what will it contailn?

1872


What is remote method invocation (rmi)?

607


Why are the destructors for base class and derived class called in reverse order when the program exits

1694


Can an interface have a class?

556


Is it safe to install java on my computer?

530


Convert a BST into a DLL and DLL to BST in place.

660