Math class and its constants

You can declare the constants as public. There is no danger in doing this because constants cannot be modified. Methods of other classes can access a public constant by first specifying the name of the class in which it is defined, then a period, then the name of the constant.
The mathclass from the standard library defines a couple of useful constants:
public class Math
{
public static final double E = 2.7182818284590452354;
public static final double PI = 3.14159265358979323846;
}
You can refer to these constants as Math.PI and Math.E in any of your methods. For example,
double circumference = Math.PI * diameter;
Consider the following links:
r) or back to Static constants
x) More on Constants

Links:
Static constants
More on Constants