private List createRandoms(List list, int n) {
Map map = new HashMap();
List news = new ArrayList();
if (list.size() <= n) {
return list;
} else {
while (map.size() < n) {
int random = (int) (Math.random() * list.size());
if (!map.containsKey(random)) {
map.put(random, "");
news.add(list.get(random));
}
}
return news;
}
}



