Javatpoint Logo
Javatpoint Logo

Java Math.cbrt() method

The java.lang.Math.cbrt () is used to return the cube root of a number.

Syntax

Parameter

Return

  • If the argument is positive or negative double value, this method will return the cube root of a given value.
  • If the argument is NaN, this method will return NaN.
  • If the argument is infinity, this method will return Infinity with same sign as the argument.
  • If the argument is positive or negative Zero, this method will return Zero with same sign as the argument.

Example 1

Test it Now

Output:

9.0

Example 2

Test it Now

Output:

Infinity

Example 3

Test it Now

Output:

-0.0

Next TopicJava Math





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA