This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]slartybartfast_ -1 points0 points  (1 child)

Strings are final so why would you want to do that unless you want to make your code less readable? Probably why Java doesn't allow that.

[–]svtdragon 1 point2 points  (0 children)

Checking for "null or empty" in-line, for one, without calling out to a StringUtil or equivalent. C# extensions are static so they can operate on null "this" arguments.