title: Java Bitwise AND operation between a double and int value
body: <p>I have a latitude value as double and I want to perform a Bitwise AND operation on it followed by right shift of bits. Following is my line of code:</p>
  
  <pre><code>pBuffer[1]=(latitude_decimal_degrees &amp; 0xFF0000) &gt;&gt; 16;
  </code></pre>
  
  <p>However a Bitwise AND operation between a double and int value is not possible. I cannot convert the latitude to int as this would not yield an accurate value. Can anybody guide me in this? </p>
  
  <p>EDIT: My requirement is basically to translate the following vb.net code into java. Reason: The lines of code below (vb.net) is part of a method written in "Basic4Android" for an android app. The exact same method is to be implement in my BlackBerry App. Therefore I need to have the exact same value generated as below which will be decoded at the server end:</p>
  
  <pre><code>Dim pBuffer(11) As Int
  Dim longitude_decimal_degrees As Double
  pBuffer(1)=Bit.ShiftRight(Bit.And(latitude_decimal_degrees, 0xFF0000),16)
  </code></pre>
  
  <p>How can these lines of code be translated into java?</p>