Math Class

 

 

 

Foreword

Resources

Code Listings

Foil Sets

Assignments

Solutions

External Resources

SiteMap

Search

Home

 

Up ] Thread Base Applet ] [ Math Class ] String Classes ] Off Screen GC ] JavaApplet Context ] Events ] Networking ] Java Appl Design ]

The Math Class

The 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 Class

The following is an example that uses the methods provide in Math class to create the stars effect over black sky.