[Bluej-discuss] Endles compilation without error report
Michael Kölling
M.Kolling at kent.ac.uk
Fri Apr 21 17:47:56 BST 2006
I also added the bracket when I first tried it out, so I didn't test
that case. (One should not quietly fix things when searching for
problems!)
However, I tried it now without the closing bracket, and the error
gets reported correctly on my system (BlueJ 2.1.2, MacOS X 10.4.6,
Java 5).
mik
On 21 Apr 2006, at 16:03, Karl Heinz Bernhart wrote:
> 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
>
> _______________________________________________
> 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