public void countDown(){
for(int i=0;i>=0;i--)
{
String tmp=Integer.toString(i);//line 5
System.out.println(tmp);
}
System.out.println("Boom");//line 8
}
when program reaches line 8 how many objects created in line 5 are eligible for garbage collection?
i thought it was 11 but the answer is 10 why?
tmp is a local variable so it should be garbage collected isnt it?