The ways to make an Object eligible for Garbage Collection (GC)?


          Even though programmer is not responsible for destruction of useless Objects.

           It is highly recommended to make an Object eligible for GC if it is no longer required.

            If an Object doesn’t contain any references then that Object eligible for GC.

             The following are various possible case to make an Object eligible for GC.

 1.Nullifying the reference variable

2.Reassigning the reference variable

3.Objects created inside a method

4.Island of Isolation