How many String objects would be created when concatenating multiple Strings?

Any answer to your question will depend on the JVM implementation and the Java version currently being used. I think it’s an unreasonable question to ask in an interview. Java 8 On my machine, with Java 1.8.0_201, your snippet results in this bytecode L0 LINENUMBER 13 L0 LDC “First” ASTORE 1 L1 LINENUMBER 14 L1 … Read more

File not found.