public class Solution {
public static void main(String[] args) throws Exception {
String[] arr = new String[10];
Scanner sc = new Scanner(System.in);
for (int i =0;i<arr.length-2;i++){
arr[i] = sc.next();
}
for (int i = 9;i< arr.length;i--){
System.out.println(arr[i]);
}
}
}
package zh.codegym.task.task07.task0702;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
/*
以相反顺序显示字符串数组
*/
public class Solution {
public static void main(String[] args) throws Exception {
String[] arr = new String[10];
Scanner sc = new Scanner(System.in);
for (int i =0;i<arr.length-2;i++){
arr[i] = sc.next();
}
for (int i = 9;i< arr.length;i--){
System.out.println(arr[i]);
}
}
}