Here is how my last interview went:
Question: Where are strings stored?
Answer: Heap since it is a reference type
One of reasons strings were made immutable, even though they are reference types, was to make them look and behave like primitive types (e.g., int, double, float).
That's also the reason why strings are the only reference type that can be represented as a literal (e.g., "some string"
). Lots of other languages take the same approach, like Java for example.