title: Type conversion in Java (Double / double)
body: <p>Please explain how type conversion in Java (Double / double, Integer / integer, ...) works.</p>
  
  <p>Why is only the last example valid?</p>
  
  <pre><code>     setLocation(double, double);
  
       // This don't work
       player.setLocation((Double) jsonMsg.get("x"), (Double) jsonMsg.get("y"));
  
       // This don't work too   
       player.setLocation((double) jsonMsg.get("x"), (double) jsonMsg.get("y"));
  
       // It's ok!
       player.setLocation( Double.parseDouble(jsonMsg.get("x").toString())
                         , Double.parseDouble(jsonMsg.get("y").toString())
                         );
  </code></pre>