About starters 100 (stamp 100)

Scanner read = new Scanner(System.in);
int t = read.nextInt();
while(t!=0)
{
t–;
int n = read.nextInt();
String s = read.next();
char array[] = s.toCharArray();
int index=0;
for(int i=0;i<n-2;i++)
{
if(array[i]==‘1’)
{
index = i;
break;
}
}
for(int j = index+1;j<=n-1;j++)
{
array[j]=‘0’;
}
System.out.println(array);
My java code is above one. I still don’t understand why it’s second testcase giving wrong answer and from 3rd onward it is saying skipped test file ? in console I run it on different testcases and it is giving me right answer.
my approach: 1] find first occurring 1 and after that make all elements zero

Try following input

1
5
00011