title: How to compare the value of two Double objects using the compare() method?
body: <p>I'm new to Java and is trying to learn the compare() method of Number class. I have declared two Double objects and tried to compare their values, however, the compiler prints out an error instead.</p>
  
  <p>Why this is happening?</p>
  
  <pre><code> Double i = new Double(3.4632);
   System.out.println(i.compareTo(m));
   Double m = new Double(96.235);
  
  java.lang.RuntimeException: Uncompilable source code - Erroneous tree type: &lt;any&gt;
  </code></pre>