Answer:
double c = Math.sqrt((Math.pow(a,2))+Math.pow(b,2));
Explanation:
given that a and b = two short sides of the right-angles triangle
c = hypothenus
Since the pythogoras theorem says the length of the hypothenus is equal to the square root of the sum of squares of the two other sides
A complete java code using methods from the Java Maths Class (Power and Square root) is given below
public class StringLength {
public static void main(String[] args) {
double a =5;
double b = 7;
double c = Math.sqrt((Math.pow(a,2))+Math.pow(b,2));
System.out.println("The Length of the Third Side (The Hypothenus) is "+ c);
}
}