How to convert decimal to binary?
<p>I would like to convert a decimal number into a binary number and return that binary number. However, I need to be able to represent this binary number as one whole <code>int</code> variable. The examples and past questions I've seen only returns 0's and 1's separately, which won't work.  </p>

<p>Right now, the way I'm doing it I'm storing the 0's and 1's in an <code>int</code> array. Is there any way to get all these array elements and form one <code>int</code> variable? Or is there another, better way? I'm trying to make as few java library calls as possible (ie few parseInt(), etc.)</p>
