title: Figuring out whether a number is a Double in Java
body: <p>I'm a Java newbie. I'm trying to figure out whether a number is a Double with something like this:</p>
  
  <pre><code>if ( typeof ( items.elementAt(1) )== Double ) {
         sum.add( i, items.elementAt(1));
  }
  </code></pre>
  
  <p>Would appreciate if someone could tell me how to rearrange the syntax to make this work properly.</p>