I’ve read on articles and books that the use of String s = new String('...'); should be avoided pretty much all the time. I understand why that is, but is there any use for using the String(String) constructor whatsoever? I don’t think there is, and don’t see any evidence otherwise, but I’m wondering if anyone in the SO commmunity knows of a use.
I’ve read on articles and books that the use of String s = new
Share
This is a good article: String constructor considered useless turns out to be useful after all!
Finally, Kat Marsen makes these points,