import java.util.ArrayList;
import java.util.Iterator;
class Test {
public static void main(String[] args) {
ArrayList<String> a = new ArrayList<String>();
a.add("java01");
a.add("java02");
a.add("java03");
a.add("java04");
a.add("java01");
System.out.println(haha(a));
}
public static ArrayList<String> haha(ArrayList<String> a) {
ArrayList<String> a1 = new ArrayList<String>();
Iterator<String> t = a.iterator();
while (t.hasNext()) {
String v = t.next();
if (!a1.contains(v)) {
a1.add(v);
}
}
return a1;
}
}