java数组去重example:
String[] str={"john","lily","lily","lucy"}; List<String> list=new ArrayList<String>(); for(int i=0;i<str.length;i++){ if(!list.contains(str[i])){ list.add(str[i]); } }