how memory management will be done in java...............
When you set a object to null it goes to deletion queue, the runtime has aGarbage Colector that clean-up the memory periodically.If you want to force the Garbage Collection, you can use System.gc() method.