标签:print and str rem for arraylist next dom 随机
Random rad = new Random();
String [] temp={"a","b","c","d","e"};
ArrayList list = new ArrayList();
for (int j = 0; j < temp.length; j++) {
list.add(temp[j]);
}
for (int j = 0; j < temp.length; j++) {
int index = rad.nextInt(list.size());
System.out.println(list.get(index));
list.remove(list.get(index));
}
标签:print and str rem for arraylist next dom 随机
原文地址:http://www.cnblogs.com/qq3245792286/p/6684470.html