Java StrictMath.pow(double a, double b)

Syntax

StrictMath.pow(double a, double b) has the following syntax.

public static double pow(double a,  double b)

Example

In the following code shows how to use StrictMath.pow(double a, double b) method.


/*  w w  w. java 2s  . c  om*/
public class Main {

  public static void main(String[] args) {
    double d1 = 1.2 , d2 = 3.4, d3 = 1;

    System.out.println(""+ d1 + " to the power of " + d2 + " = " + StrictMath.pow(d1 , d2));
     
    System.out.println(""+ d1 + " to the power of " + d3 + " = " + StrictMath.pow(d1 , 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