The line String str12 = "He" + "llo"; causes the compiler to create a String constant "Hello". Since all the pieces being concatted together are compile-time constants, the compiler can treat treat them as a single String. So, like all string literals, it goes into the constant pool.

Then we intern str11, which also has contents "Hello". The result we get back from intern() is a reference to a String in the constant pool. Since "Hello" was already there from the above steps, it's the same object, and == is true.