Code never returns
How come this Java 1.4 code never returns me to the command line? It leaves my command window hung until I type Ctrl-C.
public class StackTraceTest
{
public static int factorial(int n)
{
...
}
public static void main(String[] args)
{
String input = JOptionPane.showInputDialog("Enger n: ");
int n = Integer.parseInt(input);
factorial(n);
System.out.println("Factorial of n: " + n);
return;
}
}
factorial is returning successfully (I know by the printouts).
The program never returns me to the command line. I also know the problem is being caused by the two input lines because if I replace them with:
int n=3;
the program returns correctly.
Thanks for your help.
-Jeff

