Only one test case Pass

import java.util.*;

public class Main {
public static void main(String args[]) {

Scanner scn = new Scanner (System.in);

int n = scn.nextInt();

for(int i=0;i<n;i++){

   int a = scn.nextInt();

   System.out.println(cbs(a));

}

}

public static int cbs(int n ){

	int [] ones = new int [n];
	int [] zeroes = new int [n];

	zeroes[0]=1;
	ones[0]=1;
	for(int i=1;i<n;i++){
		zeroes[i]=ones[i-1]+zeroes[i-1];
		ones[i]=zeroes[i-1];
	}

	return zeroes[n-1]+ones[n-1];

}

}

One test case Passed but rest of the test case showing wrong answer

Hey @uttkarsh17goswami
just a change
long[] ones = new long[n];
long[] zeroes = new long[n];
Instead of int
Correct Code
import java.util.*;

public class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
for (int i = 0; i < n; i++) {
int a = scn.nextInt();
System.out.println(cbs(a));
}
}

public static long cbs(int n) {
	long[] ones = new long[n];
	long[] zeroes = new long[n];
	zeroes[0] = 1;
	ones[0] = 1;
	for (int i = 1; i < n; i++) {
		zeroes[i] = ones[i - 1] + zeroes[i - 1];
		ones[i] = zeroes[i - 1];
	}
	return zeroes[n - 1] + ones[n - 1];
}

}