Now what’s wrong in this?
import java.util.*;
class Codechef
{
public static void main (String[] args)
{
Codechef ob=new Codechef();
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int o=0;o<t;o++){
int n=sc.nextInt();
int a[]=new int [n];
for (int i=0;i<n;i++ )
a[i]=sc.nextInt();
int m=n/2,l=0,u=n-1;
boolean f=true;
while (l!=m){
if ((a[l++]!=a[u–]))
f=false;
}
if (a[m]!=7)
f=false;
if (f)
System.out.println("Yes");
else
System.out.println("No");
}
}
}