5 ms·
No, string deduplication takes place in the internal String char array. Each String will still have it's own object.
by jontro 12y ago
No, string deduplication takes place in the internal String char array. Each String will still have it's own object.
- zackangelo 12y agoNot according to the article: > In fact the String Deduplication is almost like interning with the exception that interning reuses the whole String instance, not just the char array.
- chrisseaton 12y agoI think that might mean the opposite of what you think it does. Interning reuses whole String instances. Deduplication is like interning with the exception that it does not reuse the whole String instance, it just reuses the char array. Therefore surely deduplication does not reuse String instances.