Loading…
Loading…
Ten exam-style questions on Math.min/max overloads, round/ceil/floor return types and negative values, pow and random, Java 21 clamp, exact arithmetic, and BigInteger and BigDecimal creation, immutability, division and equality, with explanations.
Practice questions for the article Java Math API, BigInteger and BigDecimal.
The questions follow Java 21 rules, as on the 1Z0-830 exam. For every Math call, write down the return type before you work out the value. Aim for at least 8 out of 10 before moving on.
Quiz path: step 25. Take the quizzes in this order, after reading each article.
Previous quiz: Array Comparison, Varargs and Multidimensional Arrays (OCP 21)
Next quiz: LocalDate, LocalTime, LocalDateTime and ZonedDateTime (OCP 21)
10 questions · pass at 68%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.