Every time we create a different String, an object is created in the pool. How many objects were created in this situation?
Try to solve this challenge before seeing the answer below.
Answer: 3 Strings and 1 StringBuilder are created in the concatenation. For performance reasons, the JVM creates a pool of Strings. When a String with the same value is created, the JVM does not create another object in the pool.