Java syntax problem

https://practice.geeksforgeeks.org/problems/binary-array-sorting/0

this is the link of the problem…

my code is :

/*package whatever //do not write package name here */

import java.util.;
import java.lang.
;
import java.io.*;

class GFG
{
public static Scanner scn = new Scanner(System.in);
public static void main (String[] args)
{
//code
int t = scn.nextInt();
while(t>0)
{
int n = scn.nextInt();
int[] arr = new int[n];
int i=0;
int j=arr.length-1;
while(i<j)
{
int helper1 = scn.nextInt();
if(helper1==0)
{
arr[i]=helper1;
i++;
}
else if(helper1==1)
{
arr[j]=helper1;
j–;
}
}
for(int p=0; p<arr.length; p++)
{
System.out.print(arr[p] + " ");
}
t–;
}
}
}

if i enter testcases as 3, then only 2 testcases are being read…

@drjindalsubhash use while(t–) in place of t>0 and remove t–

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.