title: How to store hexadecimal value in short variable using java?
body: <p>When I assigned <code>vlanid=0x960</code>.(hexadecimal value) directly,It works very well. But when I use java function for same purpose,It get stored as decimal value. I attached the code here.</p>
  
  <pre><code>int vlanid,
  
  short vlanid1;
  
  vlanid= (int) jSpinner1.getModel().getValue();
  
  vlanid1 = Short.parseShort(((Integer.toHexString(vlanid))),16);
  </code></pre>