Count number of binary Strings

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t–>0){
int n = sc.nextInt();
BS(n);
}

}

public static void BS(int n){
	if(n==0){
		System.out.println(0);
	}
	int[] zeros = new int[n];
	int[] ones = new int[n];

	//seed

	zeros[0] = 1;
	ones[0] = 1;

	for(int i=1;i<zeros.length;i++){
		zeros[i] = zeros[i-1] + ones[i-1];
		ones[i] = zeros[i-1];
	}
	
	 int ans = zeros[n-1] + ones[n-1];
	 System.out.println(ans);
}

}

//sir I’m not able to pass all test cases but I am not getting whats wrong in the code

@Siddharth_sharma1808,
https://ide.codingblocks.com/s/230854 corrected code.

Use long instead of int.