Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: typo

...

The class java.lang.Math defines a large set of numeric constants, such as PI and the exponential constant E. Prefer the use of predefined constants when the they are available.

Code Block
bgColor#ccccff
double area(double radius) {
return 4.0 * Math.PI * radius * radius; }

double volume(double radius) {
return 4.0/3.0 * Math.PI * radius * radius * radius; }

double greatCircleCircumference(double radius) {
return 2 * Math.PI * radius; }

...