2012-03-01 32 views

回答

6

如何:

private static final BigInteger MASK = BigInteger.valueOf(0xffffffff) 
               .shiftLeft(32); 

... 

public static boolean top32BitsSet(BigInteger value) { 
    return value.and(MASK).equals(MASK); 
} 
相關問題