Guest User

Untitled

a guest
Jul 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. class BitwiseAnd {
  2.     public static void main(String[] args) {
  3.         int bitmask = 0x0000000F; //the last hex digit
  4.         int val = 0x22222222;   //4 byte value containing 101010 repeating
  5.  
  6.         System.out.println(val & bitmask);  //guess what this prints
  7.     }
  8. }
Add Comment
Please, Sign In to add comment