Both requirements -> "The program should display 10 strings on the screen, each on a new line" and "The program should display the array (10 elements) in reverse order are both satisfied, but "The task failed to pass testing" for each of these requirements renders in the "Validation" window, inside my IJ IDEA. I cannot determine why this is happening when clearly, the software behaves exactly as the requirements specify. If my program produces the correct output per the requirements listed, why is this task showing as "failed"?
package en.codegym.task.jdk13.task07.task0702;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.sql.SQLOutput;
/*
String array in reverse order
*/
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
String[] tenStrings = new String[10];
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
tenStrings[8] = "Nine";
tenStrings[9] = "Ten";
for (int i = 0; i < (tenStrings.length - 2); i++) {
System.out.println("Please enter a value...");
String s = reader.readLine();
tenStrings[i] = s;
}
for (int i = 1; i < tenStrings.length; i++) {
System.out.println(tenStrings[tenStrings.length - i]);
}
}
}