When are Java Strings interned?

Viewed 2557

Inspired by the comments on this question, I'm pretty sure that Java Strings are interned at runtime rather than compile time - surely just the fact that classes can be compiled at different times, but would still point to the same reference at runtime.

I can't seem to find any evidence to back this up. Can anyone justify this?

2 Answers
Related