The Math class: pow, sqrt, cbrt, ceil, floor, round, rint, abs, max, min, random, hypot and the Exact methods.
In this chapter
- The java.lang package and calling Math methods
- Powers and roots: Math.pow, Math.sqrt and Math.cbrt
- Rounding with ceil, floor, round and rint, including negative numbers
- Math.abs, Math.max and Math.min, and their return types
- Math.random, Math.hypot and the addExact, subtractExact and multiplyExact methods
- Writing maths formulas as Java expressions
- Exam tips: return types and output questions