java.lang.Math.
This is a class which contains static methods for performing many standard mathematical operations like square roots and cosines. You will need it for many of this
weeks exercises.
The Math
class contains several dozen static methods. Recall
that to use a static method from a class, you just prefix its name with the name of the class followed by a period. For instance
double x = Math.sqrt(9.0);
You never need to instantiate the Math
class directly. (In fact you can't.
The Math()
constructor is declared private.)