This code should compile, should it not? What am I doing wrong? I would like the code to briefly pause before displaying each number in the array.
public static void median(int odd[]) throws InterruptedException {
Arrays.sort(odd);
for (int i = 0; i < odd.length; i++) {
System.out.println(odd[i]);
Thread.sleep(500);
}
System.out.println("The median number of the previous list of numbers is: " + odd[5]);
}