Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes Code to get list of duplicate elements from ArrayList Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Code to get list of duplicate elements from ArrayList" Watch "Code to get list of duplicate elements from ArrayList" New topic
Author

Code to get list of duplicate elements from ArrayList

Krishna Tota
Ranch Hand

Joined: Mar 22, 2008
Posts: 40
Hi,
I knnow that in list interface we can store duplicate elements by using method like

void add(int index,Object obj).

I want the code for rettriving only the duplicate elements from the list.

Please give the code for this


Thanks,
Krishna
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3011
    
    9
Originally posted by Krishna Tota:
Please give the code for this


Why don't you show us what you have tried so far. You won't learn as well if we just give you the answer.


Joanne
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Code to get list of duplicate elements from ArrayList
 
Similar Threads
How to store unique elements in List?
Duplicate Elements
List and set
How to remove duplicate element from List
Collections