what is the earliest line in the following code after which object b
will be a candidate for being garbage collected.
public class test{
Static
string f()
{
String s="hello";
String b="bye"; //1
String c=b+"i";
String d=b;
b=a; //2
d=a; //3
return c; //4
}
public static void main(String s[])
{String msg=f();
System.out.println(msg); // 5
}
}
can any one tell the answer with explanation