In the above code how many objects will be created? And how many shall be ready for garbage collection?
Also,i want to know 2 things:
1) Will it make a difference if i initialize the String s variable in the loop?
2) Will it make a difference if instead of the string i define an int?
I am very confused with these basic stuff.