Вообщем немного не понимаю как сделать обратный порядок, вот и ошибка
package com.javarush.task.pro.task05.task0505;
import java.util.Scanner;
/*
Reverse
*/
public class Solution {
public static void main(String[] args) {
//напишите тут ваш код
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[] array = new int[N];
for (int i = 0; i < N; i++) {
array[i] = sc.nextInt();
} for (int i = 0; i < N; i++) {
if (N % 2 != 0) {
System.out.println(array[i]);
}
else {
for (int j = N; j >=0; j--) {
System.out.println(array[j]);
}
}
}
}
}