Java equivalent of if (edgeTable[cubeindex] & 256) in c++
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/10064068/using-a-bitwise-inside-an-if-statement">Using a bitwise &amp; inside an if statement</a>  </p>
</blockquote>



<p>I have the following piece of code from <a href="http://local.wasp.uwa.edu.au/~pbourke/geometry/polygonise/" rel="nofollow">http://local.wasp.uwa.edu.au/~pbourke/geometry/polygonise/</a></p>

<pre><code>    if (edgeTable[cubeindex] &amp; 1)
      vertlist[0] =
         VertexInterp(isolevel,grid.p[0],grid.p[1],grid.val[0],grid.val[1]);
   if (edgeTable[cubeindex] &amp; 2)
      vertlist[1] =
         VertexInterp(isolevel,grid.p[1],grid.p[2],grid.val[1],grid.val[2]);
</code></pre>

<p>How can i rewrite the if statements so they will run in Java ?</p>

<p>Regards Michael</p>
