OK, let's forget about garbage collection for a moment. How many objects are there in total? It seems that a number of people here aren't counting the number of loop iterations correctly. When you see "for (int i = 0; i < 10; i++)"
you should be able to tell that the loop is executed exactly 10 times. Not 11. Not 9. Exactly 10.
As for the garbage collection part, this is an old question with no definite answer - it turns out it depends on the JVM used. And the reasons are too complex to come up on the exam, so you can safely ignore this question if you just want to do well on the exam. But if you want to learn what's going on here, check out past discussions
here and
here. (Note that this version of the question has a <= in place of <, so there are 11 objects total here.) Enjoy.