About 28,300 results
Open links in new tab
  1. Java Math methods
    Java Math class functions for calculations, trigonometry, rounding, and conversions
    ABS
    Absolute value calculation
    acos
    Arc cosine radians
    addExact
    Exact sum integers
    asin
    Arc sine radians
    atan
    Arc tangent radians
    atan2
    Polar angle conversion
    cbrt
    Cube root calculation
    ceil
    Round up value
    copySign
    Copy number sign
    COS
    Cosine of radians
    cosh
    Hyperbolic cosine value
    decrementExact
    Exact decrement integer
    exp
    Euler exponent value
    expm1
    Exponent minus one
    Floor and ceiling functions
    Round down value
    floorDiv
    Floor integer division
    floorMod
    Floor division remainder
    getExponent
    Unbiased exponent retrieval
    hypot
    Hypotenuse calculation
    IEEEremainder
    IEEE remainder operation
    incrementExact
    Exact increment integer
    log
    Natural logarithm value
    log10
    Base ten logarithm
    log1p
    Logarithm plus one
    max
    Maximum value selection
    min
    Minimum value selection
    multiplyExact
    Exact multiplication result
    negateExact
    Exact negation integer
    nextAfter
    Adjacent float direction
    nextDown
    Adjacent negative float
    nextUp
    Adjacent positive float
    pow
    Power calculation value
    random
    Random number generation
    rint
    Round to integer
    round
    Nearest integer rounding
    scalb
    Scale by power
    signum
    Sign determination value
    sin
    Sine of radians
    sinh
    Hyperbolic sine value
    sqrt
    Square root calculation
    subtractExact
    Exact subtraction result
    tan
    Tangent of angle
    tanh
    Hyperbolic tangent value
    toDegrees
    Radians to degrees
    toIntExact
    Long to int
    toRadians
    Degrees to radians
    Unit in the last place
    Unit precision size
    • Work Report
    • Email
    • Rewrite
    • Speech
    • Title Generator
    • Smart Reply
    • Poem
    • Essay
    • Joke
    • Instagram Post
    • X Post
    • Facebook Post
    • Story
    • Cover Letter
    • Resume
    • Job Description
    • Recommendation Letter
    • Resignation Letter
    • Invitation Letter
    • Greeting Message
    • Try more templates
  1. The Java Math class provides a wide range of methods for performing mathematical operations. These methods are static, meaning they can be called directly on the Math class without creating an instance of it. Here are some of the most commonly used methods:

    Basic Math Methods

    • abs(x): Returns the absolute value of x.

    • max(x, y): Returns the larger of two values.

    • min(x, y): Returns the smaller of two values.

    • round(x): Rounds the decimal number to the nearest integer.

    • sqrt(x): Returns the square root of x.

    • cbrt(x): Returns the cube root of x.

    • pow(x, y): Returns x raised to the power of y.

    • signum(x): Returns the sign of x.

    • ceil(x): Returns the smallest integer greater than or equal to x.

    • floor(x): Returns the largest integer less than or equal to x.

    Example:

    Feedback
  2. Math (Java SE 25 & JDK 25)

    Jan 20, 2026 · The class Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.

  3. Java Math Reference - W3Schools

    48 rows · The Java Math class has many methods that allows you to perform mathematical tasks on …

  4. Java Math Class - GeeksforGeeks

    Jul 23, 2025 · Let us check the method provided in the Math class. Returns the trigonometric value of the sine of an angle. Returns the trigonometric value of the cosine of an angle. Returns the …

  5. Java Math Class - Complete Tutorial with Examples - ZetCode

    Apr 13, 2025 · In this article, we've covered all major methods of the Java Math class with practical examples. These methods provide essential mathematical operations that are fundamental to many …

  6. Mathematical Methods in Java: A Comprehensive Guide

    Jan 16, 2026 · These methods are crucial for a wide range of applications, from simple arithmetic calculations to complex scientific and engineering computations. In this blog, we will explore the …

  7. Java Math Methods - Programiz

    In this reference page, you will find all the math methods available in Java. For example, if you need to get the square root of a number, use the sqrt () method.

  8. Java Math - DataCamp

    Explore the Java Math class for efficient numeric operations like square root, logarithms, and trigonometry. Learn usage, methods, and examples to enhance your Java programming skills.

  9. A Guide to the Java Math Class - Baeldung

    Jan 8, 2024 · In this tutorial, we’re going to describe the Math class that provides helpful static methods for performing numeric operations such as exponential, logarithm, etc.

  10. Java Math Methods: A Comprehensive Guide to Using Math ...

    Essential Java Math Methods: This guide covers fundamental methods like Math.max(), Math.min(), Math.sqrt(), Math.abs(), and Math.random(), providing clear explanations and practical examples for …

  11. Java Math Class Methods

    Jun 25, 2024 · The table below contains all the commonly used methods of the Java Math class, each with a link to a detailed explanation, examples, and real-world uses. Click on the method names to …

By using this site you agree to the use of cookies for analytics, personalized content, and ads.Learn more about third party cookies|Microsoft Privacy Policy