0

I have one String literal which refers to a string pool reference

String s1 = "abc";

Suppose i create/assign a new String literal like:

String s2 = s1 + "pqr";

Which of the following will happen?

  1. change contain of existing string pool object.
  2. create new object in string pool and assign to s2, if yes then what is the size of s2;
raphaëλ
  • 6,393
  • 2
  • 29
  • 35
Gabu
  • 83
  • 1
  • 13

0 Answers0