(adsbygoogle = window.adsbygoogle || []).push({}); Math.PI comes up with "cannot find symbol" error

class Pi {

public static void main (String[] args) {

float radius=Float.parseFloat(args[0]);

float shortPi=(float) Math.PI;

float circ= shortPi *(radius+radius);

float area= shortPi *(radius*radius);

System.out.print("with Pi commuted from " +Math.PI);

System.out.println(" to " + shortPi + "...");

System.out.println("A circle radius of " + circ + " cm");

System.out.print("has a circumference of " +area+ "sq.cm");

}}

_______________________________________________________

I get two "cannot find symbol" errors, both of which point to the use of Math.PI. Is there something else I need to do? Math.PI is suppose to be constant value worth 3.141592653589793

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Math.PI comes up with cannot find symbol error

**Physics Forums | Science Articles, Homework Help, Discussion**