I understand that every time I type the string literal \"\", the same String object is referenced in the string pool.
But why doesn\'t the String API in
I understand that every time I type the String literal "", the same String object is referenced in the String pool.
There's no such guarantee made. And you can't rely on it in your application, it's completely up to jvm to decide.
or did the language creators simply not share my views?
Yep. To me, it seems very low priority thing.