I've build an array with 10 plurals of 7 and am now trying to print it in reversed order with a for loop. but my program seems to be ignoring this code. I've no issues printing it in regular order with a for or a for each loop. What is wrong in this piece of code?
int[] numbers = new int[10];
for (int i = 0; i < numbers.length; i++) {
numbers[i] = (int) (Math.random() * 10) * 7;
}
for (int i = numbers.length; i == 0; i--) {
System.out.println(numbers[i]);
}
System.out.println("---");
for (int i = 0; i < numbers.length; i++) {
System.out.println(numbers[i]);
}