Following is the declaration for java lang math class.
Java lang math class.
The various java math methods are as follows.
The void class is a non instantiable class that holds a reference to a class object representing the type void.
If the argument is nan or less than zero the result is nan.
Java lang math public final class math extends object the class math contains methods for performing basic numeric operations such as the elementary exponential logarithm square root and trigonometric functions.
If the argument is negative the negation of the argument is returned.
This method can handle all the data types.
The class math provides commonly used mathematical functions such as sine cosine and square root.
Following are the fields for java lang math class.
Java lang math public final class math extends object the class math contains methods for performing basic numeric operations such as the elementary exponential logarithm square root and trigonometric functions.
If the argument is not negative the argument is returned.
The java lang math abs int a returns the absolute value of an int value.
The java lang math class contains methods for performing basic numeric operations such as the elementary exponential logarithm square root and trigonometric functions.
The classes string stringbuffer and stringbuilder similarly provide commonly used operations on character strings.
Public final class math extends object field.
The java lang math sqrt double a returns the correctly rounded positive square root of a double value.
Result is positive zero if the argument is positive zero or negative zero.
Note that if the argument is equal to the value of integer min value the most negative.
Java lang math public final class math extends object the class math contains methods for performing basic numeric operations such as the elementary exponential logarithm square root and trigonometric functions.
Methods of lang math class.