Whats the error in this code

mport java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
int T=sc.nextInt();
for(int i=0;i<T;i++){

		int n=sc.nextInt();

        int setBit = 0;
while(n>0){
    if((n & 1)!=0){
        setBit++;
    }
    n = n>>1;
}

System.out.print(setBit);




	}

}

}

print ans for each testcase in a new line. Use System.out.println

also please always share your code after saving it on ide.codingblocks.com in future.copy pasting here causes syntax problem in the code