for (int i = myList.length - 1; i > 0; i--){ int j = (int) (Math.random() * (i + 1)); double temp = myList[i]; myList[i] = myList[j]; myList[j] = temp; }