How can you eliminate duplicates?

Answers were Sorted based on User's Feedback



How can you eliminate duplicates?..

Answer / deepak kumar sungh

Any Set. set always contains unique elements. However, you
must take care in case of objects where you need to define
the hashCode and equals method

Is This Answer Correct ?    2 Yes 0 No

How can you eliminate duplicates?..

Answer / ravikiran(aptech mumbai)

by making using of HashSet

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

I have a String s = java; What is the output when I say s.replaceAll('j', 'k'); Also what is the value of s after replacing?

8 Answers   KPIT,


What is audio clip interface? Name few methods of it ?

1 Answers  


How do you declare an array that will hold more than 64KB of data?

0 Answers   Aspire, Infogain,


What is an image buffer?

0 Answers  


What is inner class?what is the use of inner class?where we create the object for inner class? and inner class can extend any class or inner class can implement any interface?

1 Answers   Wipro,






What is the specification of ?CODEBASE? in an applet?

1 Answers  


what are the design patterns in struts?

1 Answers  


Can we serialize static variables in java?

0 Answers  


How is treeset implemented in java?

0 Answers  


Can memory leak happen java?

0 Answers  


Can a class have more than one object?

0 Answers  


can we create object for static class in java

14 Answers   IAP Company, IBM, Marlabs, mPortal, TCS,


Categories