Javatpoint Logo
Javatpoint Logo

Java String isEmpty()

The java string isEmpty() method checks if this string is empty or not. It returns true, if length of string is 0 otherwise false. In other words, true is returned if string is empty otherwise it returns false.

The isEmpty() method of String class is included in java string since JDK 1.6.


Internal implementation


Signature

The signature or syntax of string isEmpty() method is given below:


Returns

true if length is 0 otherwise false.


Since

1.6


Java String isEmpty() method example

Test it Now
true
false

Java String isEmpty() Method Example 2

String s1 is empty
Javatpoint
Next TopicJava String join()




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA