展开全部
package test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class Test {
public static void main(String[] args) {
//String[] arg = { "123", "abc", "df", "ABC", "abc", "DF", "s" };
String[] arg = {"abc","ABC","123","AbC","aBC","aaa"};
System.out.println(Arrays.toString(getArray(arg)));
}
public static String [] getArray(String [] array){
List list = new ArrayList();
Set set = new HashSet();
for(String s : array){
if(set.add(s.toLowerCase())){
list.add(s);
}
}
return list.toArray(new String [list.size()]);
}
}
纯手打32313133353236313431303231363533e78988e69d8331333335313261代码,验证通过