The solution outputs the array in reverse order as asked, but the system does not pass testing of the last condition. Can anyone tell me why?
package com.codegym.task.task07.task0702;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
String array in reverse order
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader (new InputStreamReader (System.in));
String[] list = new String [10];
for (int i = 0; i<8; i++){
list[i]= br.readLine();
}
for (int i = 9; i<list.length; i--){
System.out.println(list[i]);
}//write your code here
}
}