This is a bad design because you are hiding NullPointerExceptions. Instead of being warned that the string is NULL, instead you will get some strange behavior in the program, and the exception is in another place.
But it all depends on whether "null" is valid for your string. Normally, "null" should never be considered the reasonable state of an object to pass through.
Oliver watkins
source share