title: Long to HEX string
body: <p>I'm having trouble converting a hexadecimal number in a String to a long and then back again. Here's the code I'm using:</p>
  
  <pre><code>private void parseExperiment(){
      String str1 = "AA0F245C";
      long nr = Long.parseLong(str1, 16);
      String str2 = Double.toHexString(nr);
  }
  </code></pre>
  
  <p>I want str2 to be the same as str1 but when I print str1, nr and str2 I get this:</p>
  
  <pre><code>str1: AA0F245C
  nr: 2853119068
  str2: 0x1.541e48b8p31
  </code></pre>
  
  <p>Anyone knows how to fix this?</p>