Here is a method which creates a number of
String objects in the course of printing a count down sequence.
public void countDown() {
for( int i = 10 ; i >= 0 ; i-- ){
String tmp = Integer.toString( i );
System.out.println( tmp );
}
System.out.println("BOOM!");
}
When the program reaches line 6, how many of the String objects created in line 3 are eligible for garbage collection? Assume that the System.out object is not keeping a reference.
OPT:a. none
OPT:b. 1
OPT:c. 10
OPT:d. 11