The answer is 1 instance in the heap and 1 in the String pool in either case as you said in your interview.
There are two spaces where Strings can reside: The heap and the perm gen where interned strings are stored.
The String constructor creates a String in the heap. String literals are created in the String pool within the permanent generation. Strings in the heap can be moved to the String pool with the method String.intern()
which interns the String (that is, determines a reference to an equal String in the pool or creates an equal String there, if there is none yet) and returns a reference to the interned String.
EDIT: To check what I have answered, add System.out.println(s1 == s2);
as a third line to each example. It will print false in both cases, proving that both objects have different memory addresses.