code: public void next() {
  		for (int k = a.length - 1; k > 0; k--) {
  			int w = (int) Math.floor(Math.random() * (k + 1));
  			int temp = a[w];
  			a[w] = a[k];
  			a[k] = temp;
  		}
  
  	}
docs: It produces the next random permutation