String s1= new String("abc");
2 objects are created. one in the heap and another "abc" in the string pool.
I have a doubt that if we assign null to s1 (s1=null
then object created
in the string pool is available for garbage collection or not.
Please give the detailed explanation ....
Thanks in advance
Regards,
Krishna.