title: Java help Decimal format cannot be resolved to a type
body: <p>I have spent a while trying to figure out why it won't use the decimal format in my java code. I have declared the decimal format with the other integers but is still coming up with errors. Here is my code:</p>
  
  <pre><code>public class Assign31
  {
    public static void main(String [] args)
    {
      DecimalFormat speedPattern = new DecimalFormat( "00.00" );
      int gearRadius = 100;
      double pi = Math.PI;
      int cadence = 90;
  
       double gearspeed = gearRadius * pi;
  
       double speedmph = gearspeed % cadence;
  
       System.out.println("The speed of the cyclist on a bike with gear 100.0 and cadence 90 is " + 
  speedmph + " mph.");
       System.out.println("The speed (rounded) of the cycleist on the bike with gear 100.0 and cadence 90 is " + 
  speedPattern.format(speedmph));
    }
  }
  </code></pre>