posted 19 years ago
Hi All,
code
--------------------
class a
{
protected void finalize()throws Throwable
{
s.o.p("a: finalize()");
}
}
class b extends a
{
protected void finalize() throws Throwable
{
s.o.p("b : finalize");
}
}
--------------------
Whats the way to call finalize Top to Bottom or Bottom to Top.
if the object of class "b" is being garbage collected, whose finalize would be called first "a"(parent) or "b"(child)?
Thanks
Chetan Dhewal
Chetan Dhewal<br />SCMAD,SCJP 1.2