I can't get to solution how to check if the array is mirrored
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int a=0 ;
System.out.print("Array length:");
int b= sc.nextInt();
int [] array = new int [b];
for(int i=0;i<b;i++) {
System.out.print("Type the number "+i+" element: ");
a=sc.nextInt();
array[i]=a;
}
System.out.println(Arrays.toString(array));
sc.close();
}
and when I type like for example Array length: 3 and my digits are 1 2 1
Array length:3
Type the number 0 element: 1
Type the number 1 element: 2
Type the number 2 element: 1
[1, 2, 1]
I get this in console , but now I don't know how to say if it is mirrored or not.