Java StrictMath.cbrt(double a)

Syntax

StrictMath.cbrt(double a) has the following syntax.

public static double cbrt(double a)

Example

In the following code shows how to use StrictMath.cbrt(double a) method.


/*from w w  w .  j a v a 2 s  .  c o  m*/
public class Main {

  public static void main(String[] args) {
  
    double d1 = 9.00, d2 = 123, d3 = 0;

    System.out.println("Cube root of " + d1 + " = " + StrictMath.cbrt(d1));
     
    System.out.println("Cube root of " + d2 + " = " + StrictMath.cbrt(d2));
     
    System.out.println("Cube root of " + d3 + " = " + StrictMath.cbrt(d3));
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable