title: Convert bitstring to byte in java
body: <p>I need to set each bit in 1 byte in Java.</p>
  
  <pre><code>bit7 -  1,
  bit6 -  1,
  bit5 - 1,
  bit4 -  0,
  bit3 – 0,
  bit2 – 0,
  bit1 – 0,
  bit0 – 0
  </code></pre>
  
  <p>I've written:</p>
  
  <pre><code>byte extra_dop = 0b00000111;
  </code></pre>
  
  <p>but got the following error:</p>
  
  <blockquote>
    <p>binary literals are not supported in -source 1.5   (use -source 7 or
    higher to enable binary literals)</p>
  </blockquote>