StrictMath.hypot(double x, double y) has the following syntax.
public static double hypot(double x, double y)
In the following code shows how to use StrictMath.hypot(double x, double y) method.
/* www. java 2s .c o m*/ public class Main { public static void main(String[] args) { double d1 = 3, d2 = 4, d3 = 6; System.out.println("hypotenuse value of d1 and d2 = " + StrictMath.hypot(d1, d2)); System.out.println("hypotenuse value of d2 and d3 = " + StrictMath.hypot(d2, d3)); } }
The code above generates the following result.