Heres what I am trying right now:
import java.util.Scanner;
public class Hypot
{
public void determineHyp()
{
Scanner keyboard = new Scanner(System.in);
System.out.println("Enter Side 1");
double side1 = keyboard.nextDouble();
System.out.println("Enter Side 2 ");
double side2 = keyboard.nextDouble();
double result = hyp( side1, side2 );
System.out.println( "Hypotenuse is: " + result );
}
public double hyp(double s1, double s2)
{
return (Math.sqrt(s1*s1 + s2*s2));
}
}
It compiles but when i run it it gets an error:
----jGRASP exec:
java Hypot
java.lang.NoSuchMethodError: main
Exception in
thread "main"
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.