regards, Amit
coffee drinker and Sun Certified Programmer for Java 2 Platform
Which is the earliest line in the following code after which the object created on the line marked (0) will be a candidate for being garbage collected, assuming no compiler optimizations are done?
Regards,
Pho
regards, Amit
coffee drinker and Sun Certified Programmer for Java 2 Platform
Originally posted by Pho Tek:
Ragu,
For Q1, I don't understand why 1 & 3 are not correct.
1) The automatic garbage collection of the JVM
prevents programs from ever running out of memory
3) Garbage collection is platform independent
In 1) isn't that the main reason for GC; since the user
is basically doing the [b]malloc and delegating
the freeing up of memory. Has you seen a case
whereby the JVM ran out of memory ?
In 3) I need some clarification on this - is "platform independent" meant to mean "independence" from "different JVMs" or "different OS e.g. linux/windows/mac ?
I have question of my own taken from Mughal:
Can somebody help and write down their thought process as they go about solving this question ?
Pho[/B]
Regards,
Pho
Consider Paul's rocket mass heater. |