Regarding class Assignment

Sir when i am runing this code in eclipse output was correct but my test cases is failed here can you tell what i have done wrong here
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int t=s.nextInt();
int sum=1;
while(sum<=t){
int n=s.nextInt();
System.out.println("#"+sum+":"+fib(n));
sum++;
}
}

public static int fib(int n){
    if(n==1){
        return 2;

    }
    if(n==2){
        return 3;
    }
    int res=fib(n-1)+fib(n-2);
    return res;
}

}

@saurabhananta
https://ide.codingblocks.com/s/155367 I have corrected your code. You need to add spaces after colon ( : ) too. Your program should work now.

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.