Suppose I have code like this.
class A{}
class Test{
public static void main(
String args[]){
A obj=new A();
Vector v=new Vector();
v.add(obj);
obj=null;
// rest of code here
}
}
The object referred to by obj will not get garbage collected until I say v=null. Am I right ?
Thanks
Devi