title: Bitwise Operator
body: <p>public class UnsignedShift {</p>
  
  <pre><code>public static void main(String[] args) {
  
      char hex[] = new char[] {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
  
  
      byte b = (byte) 0xf1;
      byte d = (byte)(b&gt;&gt;&gt;4); 
  
  
      System.out.println("b&gt;&gt;&gt;4=0x" + hex[(d&gt;&gt;4)&amp;0x0f] + hex[d&amp;0x0f]);
  
      }
  </code></pre>
  
  <p>}</p>
  
  <p>The result = 0xff </p>
  
  <p>can anyone explain how it is possible in Java?</p>
  
  <p>I think,it is 0x0f</p>