import java.util.*; class SelSort8 // Selection sort on a random ArrayList of integers // Timed but not printed { public static void main(String[] args) throws Exception { Random rand = new Random(); long time1,time2; Scanner input = new Scanner(System.in); System.out.print("Enter the number of numbers: "); int num = input.nextInt(); System.out.print("Enter the highest number: "); int high = input.nextInt(); ArrayList a = new ArrayList(); for(int i=0; i a) { for(int i=0; i a,int pos) { for(int i=pos+1; i a,int pos1,int pos2) { Integer temp = a.get(pos1); a.set(pos1,a.get(pos2)); a.set(pos2,temp); } }