title: Casting an instance of Object to primitive type or Object Type
body: <p>when I need to cast an instance of type <code>Object</code> to a double , which of the following is better and why ?</p>
  
  <p><code>Double d = (Double) object;</code></p>
  
  <p>Or</p>
  
  <p><code>double d = (double) object;</code></p>