Home >>Java Math Methods >Java Math.cbrt() method
The java.lang. Math.cbrt() in Java Math is used to helps to return a number's cube root.
public static double cbrt(double x)
x=This parameter is ued to paq a value
This method returns the cube root of x.
public class MyClass
{
public static void main(String[] args)
{
double x = 525;
System.out.println(Math.cbrt(x));
}
}
public class MyClass
{
public static void main(String[] args)
{
double a = 1.0/0;
System.out.println(Math.cbrt(a));
}
}