I try to run this program but I don't can.
write a Java Program that calculates the length of a hypotenuse of a right
triangle.the method should take two arguments of the double and return the hypotenuse as double.
import java.io.*;
public class Hypotenuse
{
public static void main(String[] args)
{
double hypotenuse;
double length;
String side1;
String side2;
/** @attribute System.STAThread() */
public static void main(String[] args)
throws java.io.IOException
{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader input = new BufferedReader(isr);
double result
System.out.print("Enter the first side of the triangle: ");
String side1 = input.readLine();
double side1 = Double.parseDouble(side1);
System.out.println();
double result;
System.out.print("Enter the second side of the triangle: ");
String side2 = input.readLine();
double side2 = Double.parseDouble(side2);
System.out.print();
//
// TODO: Add code to start application here
//
}
result = hypotenuse ( side1, side2 );
System.Out.println("Hypotenuse of your triangle is: " + result );
return 0;
}
}