public void shuffle(){
  Random r=new Random();
  int num=count;
  while (num > 1) {
    int value=r.nextInt(num);
    num--;
    int temp=data[num];
    data[num]=data[value];
    data[value]=temp;
  }
}

public void shuffle ( ) { Random r = new Random ( ) ; int num = count ; while ( num > 1 ) { int value = r . nextInt ( num ) ; num -- ; int temp = data [ num ] ; data [ num ] = data [ value ] ; data [ value ] = temp ; } }
randomize the order of the list elements . note that this does not obey the randomseed ( ) function in papplet .
