/** Return a list of all items in L that appear more than once.*/ ArrayList<String> result = new ArrayList<String>(); n = 0;
for (ListIterator<String> p1 =
我有一份清单:我想使用getCountry()方法,按国家名称对它们进行排序。如何才能做到这一点?public class Country implements Comparablepublic int compareTo(Object another) { return 0;你能告诉我如何比较它们以按字符串排序吗?阿根廷、奥地利、巴西等。