tricky知识点与任务列表

n & (n-1)的效果是把该数二进制中最右边的一个1变成0,可以用来统计二进制中1的个数,或者判断二进制中只有一个1(n & (n-1) == 0)
return num > 0 && (num&(num-1)) == 0 && (num & 0x55555555) != 0;可以用来判断是否是4的指数(//0x55555555 is to get rid of those power of 2 but not power of 4,so that the single 1 bit always appears at the odd position )
return num > 0 && (num&(num-1)) == 0可以用来判断是否是2的指数

n!尾部含0的个数为n/5 + n/25 + n/125 + n/625 + ……

HashMap的源码
TreeMap的源码
HashSet的源码
Concurrent的源码
ArrayList的源码
LinkedList的源码
。。。

String
StringBuffer
StringBuilder
Integer
Arrays
Collections
Byte