๐Ÿ’ปap computer science a review

Math.abs()

Written by the Fiveable Content Team โ€ข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโ€ขWritten by the Fiveable Content Team โ€ข Last updated September 2025

Definition

The Math.abs() method is a built-in function in Java that returns the absolute value of a number. It takes a single argument and can be used with both integer and floating-point numbers.

"Math.abs()" also found in: