[Bluej-discuss] Endles compilation without error report

Philippe Polet ppolet at univ-valenciennes.fr
Fri Apr 21 12:27:26 BST 2006


Hello Karl

I have just "copy and past" your source code. I have no problem at 
the compilation and at the execution....

my configuration :
WinXP
bluej 2.1.2
jdk 1.5.0_05

At 12:47 21/04/2006, you wrote:
>Hello to all list members,
>
>when I try to compile the elementary example class given below, the
>compiler seems to hang and the process must be terminated violently
>via resetting the JVM. (BlueJ 2.1.2 MacOS 10.4.5)
>
>The class implements two methods for calculating the factorial of a
>number - one iteration and one recursion.
>
>Commenting out the one or the other method didn't help.
>
>I cannot see the bug:
>
>//======================================
>public class Fakultaet
>{
>      public long FIt(int n)
>      {
>          //iterative Berechnung der Fakultaet einer Zahl n
>          long factorial=1;
>          for (int i=1; i<=n; i++)
>              factorial *= i;
>          return factorial;
>      }
>
>      public long FRek(int n)
>      {
>          //rekursive Berechnung der Fakultaet einer Zahl n
>          if (n == 0)
>              return 1;
>          return n*FRek(n-1);
>      }
>//========================================
>
>Maybe someone has an idea?
>
>Thanks
>
>Karl Heinz
>_______________________________________________
>mailing list bluej-discuss at bluej.org
>To unsubscribe or change your preferences, go to
>http://lists.bluej.org/mailman/listinfo/bluej-discuss



More information about the bluej-discuss mailing list