[Solved] String array vs String split array [duplicate]
The reason beeing is the compiler. At compile time the compiler does notice that the literal Hi exists twice in the code and does intern this string for your specific class. After compilation both of your interned strings Hi are pointing to the same reference of Hi. That´s the reason why the second print results … Read more