I have 100 record [1 -> 100], i want get random 50 record in this, how to do in java? Thanks.
Set set; List list = new ArrayList(set); Collections.shuffle(list); List random50 = list.subList(0, 50);