我有一个ArrayList包含重复项和三次出现的元素的值,我想收集那些特别发生三次的值,ArrayList如同
Arraylist<String> strings; //contains all strings that are duplicates and that occur thrice
Run Code Online (Sandbox Code Playgroud)
在这里,我想只获得在另一个数组列表中出现三次的字符串.
Arraylist<String> thrice; //contains only elements that occur three times.
Run Code Online (Sandbox Code Playgroud)
目前,我有一个处理重复的解决方案,但我不能扩展这只是为了获得三次出现的字符串,这请帮助我找出答案.