public class Solution
public int hammingWeight(int n)
Hahaha it works but why every downvoted it
I vote for it since it is Java. Java provides better functionalities with sacrifice in efficiency.
Why not use it if Java has done it for us?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.