There is nothing in the default JDK that I know of. You may need to define your own constant or import a third-party library that has it.
If you intend to check for an empty string, you can try the following.
YOUSTRING.isEmpty();
However, note that isEmpty is not Null safe, and not in all versions of the JDK.
To be safe, use "".equals(YOURSTRING);
However, this adds an empty string to HEAP every time you do this. Thus, it is best to specify the public static final constant, so there is only one on the heap.
source share