# Math and Random

Calculate square roots, powers, rounding and the bigger of two numbers with the Math class, make random whole numbers, decimals and true-or-false answers with Random, for dice, passwords and geometry, and pick the right tool from the chapter for each job.

![Cheat sheet: Math and Random](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/bb5104bb74ed41799871fc72b790b0a7.webp)

- Category: Java
- Level: Novice
- Tags: java
- Author: Gregor Dzierzon
- Updated: November 24, 2026

Source: https://www.ask-codey.com/cheat-sheets/java-math-and-random-cheat-sheet
