Hi,
I have declared one variable inside a method like
String strName =null;
I am doing some operations on that variable and exiting from the method..I have read that we should make the variable as null inside finally black or at the end of method..But my question is since strName is local variable it will be GC'ed automatically when the method returns..Is it necessary to make all the local variables as null at the end of method...what will happen if I declare one class level (global variable) and have not assigned null to that variable..?when it will be GC'ed?
thanks,
A.Umar