I have an arraylist which contains some values with duplicates i want to collect those values into another Arraylist.... like
Arraylist<String> one; //contains all values with duplicates
one.add("1");
one.add("2");
one.add("2");
one.add("2");
Here, I want to get all the duplicates values in another arraylist...
Arraylist<String> duplicates; //contains all duplicates values which is 2.
I want those values which counts greater or equals 3.....
Currently, I don't have any solution for this please help me to find out