To date, we have assigned only values of type double to variables.
Values of type double contain a decimal point.
Often we need only whole numbers, e.g., for a counter.
If you want a variable to hold a whole number, declare a variable of type int, e.g.,
int i;
i = 0;
abs() – takes one parameter and returns its absolute value
pow() – takes two parameters and returns the 1st parameter raised to the power that is the second parameter.
Use parentheses where necessary to group operations.
The Java Application Programming Interface (API) lists all the classes and the methods they define that are supplied with the Java Software Development Kit (SDK). Use this link: http://docs.oracle.com/javase/8/docs/api/
The API has three frames:
For example, select java.lang in window 1 and Math in window 2 and inspect the methods supplied by the Math class.