Counting the number of on bits in an integer is a very common thing to want to
do, and even exists in BigInteger, but it is package private. Sure would be
nice if this was public and moved to Integer, or perhaps Math.
Comments
EVALUATION
Yes, that pop count operation would be convenient; Tiger bug 4495754 covers that feature, among others. In the meantime, see Hank Warren's recently published "Hacker's Delight" for crafty codes to make such low-level operations run fast.
Closing as a dup.
###@###.### 2002-08-23