My two cents
public Collection getRandomSubset(int max,int count){
if(count > max){
throw new IllegalArgumentException();
}
ArrayList list = new ArrayList();
for(int i = 0 ; i < count ;i++){
list.add(i);
}
Collections.shuffle(list);
return list.subList(0, count);
}