public class Solution { public int hammingWeight(int n) { return Integer.bitCount(n); } }