The answer for this question is given to be option D in one of the mock exams. Could somebody explain why. I thought it was option B.
1.public static void main(
String args[]) {
2.Button c = new Button("Smile");
3.Button c1 = new Button("Frown");
4.c1=c;
5. c=null;
6c1.setLabel("Laugh");
7.Button c2 = new Button();
8.}
After execution of which statement number does the object originall held by variable c become eligible for
garbage Collection ?
A. 4
B. 5
C. 6
D. never