No, why would "A"'s finalizer be called? "A" never goes out of scope, nor
does "A" reference "B". "B" will be garbage collected because nothing
references it.
> <quote src="Jonathan Hawkes">
> Before an object is discarded, any object that references that object will
> have its finalize() method invoked.
> </quote>
>
> Can this mean anything else than
> class A
> {
> protected void finalize()
> {
> System.out.println( "Jonathan's text says this method is
called." );
> }
>
> public static void main( String[] args ) throws Exception
> {
> A a = new A();
> B b = new B();
> b = null;
> synchronized( A.class )
> {
> System.gc();
> wait();
> }
> }
> }
>
> public class B
> {}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]