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