emma roberts wrote:. . . the two variable x and z will point on the same pool
Why? String references only point to the same object if the two are compile‑time constants or interned. The trim() method doesn't produce a compile‑time constant or anything, and intern() isn't used there, so the two references won't point to the same object.
posted 1 year ago
can you give me some documentation to understand more this notion