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
It's funny how old this is and there is still no nice string class like there is in C#. I have been doing Java for a few years now and I still also do c#. When I do Java I miss the completeness of the c# language for strings. Mainly I miss string.Empty and string.IsNullOrEmpty(string). I also really miss the lowercase string type.
++++1 for adding this stuff to Java. All the workarounds are just that. Happy Coding in 2020 and beyond!!