|
|
The Math ClassThe Math class provides several methods for implementing the standard mathematical functions. All of the Math member functions are static, so you do not have to create an instance of the Math class. Instead, append the method you want to use with the Math class reference. Math.method(variable, ...) Be sure to note the return types and argument variables. JAVA API reference : java.lang.Math Example on Math ClassThe following is an example that uses the methods provide in Math class to create the stars effect over black sky.
|