[Bluej-discuss] Endles compilation without error report

Karl Heinz Bernhart kh.bernhart at web.de
Fri Apr 21 16:03:25 BST 2006


hello Philippe,

I forgot to put the closing bracket of the class. Obviously you added  
it silently, because without this }-bracket the compiler hangs - at  
least in MacOS X.

thank you for your answer

Karl Heinz
Am 21.04.2006 um 13:27 schrieb Philippe Polet:

> 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
>
> _______________________________________________
> 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