/* In Class problem: Write a program to set up an array of 8 values. Randomly generate 8 numbers from 1-10 to store in the array. Then print them out in the reverse order in which they were generated.*/ public class ClassExercise2 { public static void main(String[] args){ int x[] = new int[800]; for (int counter=0; counter < x.length; counter++) x[counter]=1+(int)(Math.random()*10); for (int counter=x.length-1; counter>=0; counter--) System.out.println("Element #"+counter+" is "+x[counter]); System.out.println(x); } //end of main } // end of class