math square function in java code example
Example 1: math square java
int i = 2;
int square = Math.pow(i, 2);
Example 2: math sqrt java
import java.lang.Math;
double x = Math.sqrt(9);
int i = 2;
int square = Math.pow(i, 2);
import java.lang.Math;
double x = Math.sqrt(9);