Java – Math cbrt Example, Math cbrt Program, Math cube root

Math class is part of java.lang package. Math cbrt method returns the cube root value of any number whatever it is double value, integer value. It means if value is 8, it will return 2 value (2×2x2=8). cbrt function return type is double.

Math cbrt example explains how to use Math cbrt function in java.

public class MathCbrtExample {

    public static void main(String[] args) {

        double E = Math.cbrt(8);

        System.out.println("Math cube root value :"+E);
    }
}

Output

Math cube root value :2.0

Tags:

Bookmark  

 

Leave a Reply

Security Code:

 

  Random Post