Get the Strings that occur exactly three times from Arraylist<String>
问题 I have an ArrayList which contains some values with duplicates and elements that occur thrice, I want to collect those values that occur thrice specifically into another ArrayList like Arraylist<String> strings; //contains all strings that are duplicates and that occur thrice Here, I want to get only the Strings that occur thrice in another array list. Arraylist<String> thrice; //contains only elements that occur three times. Currently, I have a solution for dealing with duplicates but I