Hi,
I am not able to understand the code below from Mughal's page 253 & 254 but i know it is finalize() chaining i have gone through these two pages many times but still not able to understand the problem I have two doubts
when you compile and run the code twice by giveing two types of COMMAND ARGUMENTS as BELOW
java Finalizers 5 50 (the 1st time)
it prints like this
50: Hello
50: Hello
50: Hello
50: Hello
50: Hello
5 blobs alive
------------------------------------------
java Finalizers 5 50000 (the 2nd time)
it prints like this
50000: Hello
50000: Hello
50000: Hello
: Bye
: Bye
50000: Hello
50000: Hello
3 blobs alive
------------------------------------------
the above is correct but what i did not understand is this
1. why cant it print 5 blobs alive when i give the 2nd COMMAND ARGUMENT as 50000
why is it saying 3 blobs alive.
2. why does it print Bye after the 3rd Hello when I give the 2nd COMMAND ARGUMENT as 50000
which does not happen when i give the 2nd COMMAND ARGUMENT 50.
Thank you very much