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?
Originally posted by Pho Tek:
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 ?
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton