|
The Math class defines two mathematical constants, pi and e. They are declared as follows:
public final static double PI
public final static double E
Since both these variables final, they represent constant values. The actual values assigned to these constants are the approximations for the real mathematical constants. Since these two variables are public as well as static, they can be accessed directly using the class name as Math.Pi and Math.E.