diff --git a/java/ALineCode.java b/java/ALineCode.java new file mode 100644 index 0000000000000000000000000000000000000000..e1dcc87284aa315a186f4efdd9e800bbee824fed --- /dev/null +++ b/java/ALineCode.java @@ -0,0 +1,20 @@ +package spring; + + +public class B { + + + public static void main(String[] args) { + System.out.println(isTwoPower(15)); + } + + /** + * 看不懂的代码 + * @param n + * @return + */ + public static boolean isTwo(int n){ + return (n & n-1) == 0; + } + +}