Denice- all your points are addressed in
this previous discussion (I see from the timestamp on your post that you were writing your post at pretty much the same time I was writing mine, so you probably hadn't seen my "Search" comment above.)
Summarizing: no, none of the Strings created in line 4 are on the String pool. "new" is not the only way to create a non-pooled string, it's just the most common one. The correct answer is indeed 11.
As for the intern pool (ignore the following if you just want to know certification-related stuff): it turns out that, contrary to some of my earlier posts on the subject, strings in the intern pool
can be garbage collected in some JVM implementations. However, Strings created from string literals and compile-time constant expressions still can not be collected
unless the class that makes use of a given string literal, is itself collected. GC of an entire
class can only occur if there are no existing instances of the class anywhere, and none of the other classes in the JVM access constructors or static methods of the class which is about to be GC'd. Which is rarely the case.
The reason an interned String created from a literal cannot be collected as long as the class which created it is still in memory, is that the class keeps its own table of compile-time constants which contains a reference to the interned String. This table of constants is separate from the intern pool. As long as the class is in memory, the reference it has for the pooled String will prevent that String from being collected.
Followup questions about GC of string literals and the like should go to the Performance forum. It's not an issue that comes up on the certification exam.