February 2014
Beginner
1248 pages
62h 25m
English
Class Math declares two constants, Math.PI and Math.E, that represent high-precision approximations to commonly used mathematical constants. Math.PI (3.141592653589793) is the ratio of a circle’s circumference to its diameter. Math.E (2.718281828459045) is the base value for natural logarithms (calculated with static Math method log). These constants are declared in class Math with the modifiers public, final and static. Making them public allows you to use them in your own classes. Any field declared with keyword final is constant—its value cannot change after the field is initialized. Making these fields static allows them to be accessed via the class name Math and a dot (.) separator, just as class
Read now
Unlock full access