@@ -0,0 +1,467 @@
+/**%0A *Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values.%0A */%0Aclass Solution %7B%0A    public boolean hasAlternatingBits(int n) %7B%0A        String binary = Integer.toBinaryString(n);%0A        char%5B%5D c = binary.toCharArray();%0A        char compare = '2';%0A        for (char temp : c) %7B%0A            if (temp == compare) return false;%0A            compare = temp;%0A        %7D%0A        return true;%0A    %7D%0A%7D%0A

Create BinaryNumberWithAlternatingBits.java