Hulk problem in the bit masking section

This is running fine on my terminal but not on hackerblocks . Plus it is always giving me error when i use scanner which runs perfectly on my terminal and any other platform . Please look into this .

import java.util.;
import java.io.
;
public class Main {
public static void main(String args[]) throws IOException{
// Your Code Here
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int tes = Integer.parseInt(br.readLine());
StringTokenizer st = new StringTokenizer(br.readLine());
while(tes > 0){
–tes;
int n = Integer.parseInt(st.nextToken());
int ans = 0;
while(n>0){
ans += n&1;
n = n>>1;
}
System.out.println(ans);
}
}
}