List<string> list = new ArrayList<string>(); list.add("aaa"); list.add("bbb"); list.add("aaa"); Set<string> unique = new HashSet<string>(list); for (String key : unique) { System.out.println(key + ": " + Collections.frequency(list, key)); }</string></string></string></string>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)