日期:2014-05-20 浏览次数:20653 次
public static void main(String[] args) { List<String> list1 = new ArrayList<String>(); System.out.println("list1.add(Object)..."); List<String> list2 = new ArrayList<String>(); System.out.println("list2.add(Object)..."); if (list1.size() == list2.size()) { for (String str1 : list1) { for (String str2 : list2) { if (!(str2.equals(str1))) { System.out.println("修改"); } } } } else { System.out.println("增加删除"); } }