How to Use Math.pow() in Java


In this example we will show you how to use math.pow() in Java.

Source Code

package com.beginner.examples;

public class Pow {
  public static void main(String[] args){
    System.out.println(Math.pow(6, 2)); // use math.pow()
  }
}

Output:

36.0

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments