According to String#intern(), intern method is supposed to return the String from the String pool if the String is found in String pool, otherwise a new string
String literals and constants are interned by default.
That is, "foo" == "foo" (declared by the String literals), but new String("foo") != new String("foo").