Java String isEmpty example

String’s isEmpty method checks if length of string is 0 or not. It returns true if length of String is 0 else return false.

Method Signature:

String isEmpty Example:

When you run above program, you will get below output:

Was this post helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *