Frage im Vorstellungsgespräch bei IBM

Explain how java handles strings and how strings are created in java

Antwort im Vorstellungsgespräch

Anonym

27. März 2024

There are two ways to create strings in java. Using string literal and using new keyword. The objects created using literal are created in string constant pool and are immutable. The objects created using new are created in heap.