How can I assign 2 bytes to a variable in Java?
<p>How can I assign 2 bytes to a variable in Java?  I know I can do this:</p>

<pre><code>byte val = 2; // this is one byte with 0000 0010
</code></pre>

<p>But I need to assign 2 bytes to val.  How can I do this?</p>
