Код: Выделить всё
String str1 = "Hello";
String str2 = "World";
String str3 = new String("HelloWorld");
String str4 = str1 + str2;
Мой вопрос, что произойдет, если я согласен 2 или более струнный ( conct 'или concat' или concat 'или concat ( (). method)?
Will a new object be created outside the pool just like in the case of String str3 or will str4 point directly at the object "HelloWorld" inside the String Constant Pool
PS : And , если это так же, как создание нового объекта снаружи пула, то как это происходит без использования ключевого слова ?
Подробнее здесь: https://stackoverflow.com/questions/506 ... g-operator