Java String isBlank() method

Java String isBlank() method


String isBlank() method added in jdk 11.

isBlank method returns true if the string is empty or contains only white space codepoints, otherwise false.

Java Program Example:

class StringIsBlackExample{
public static void main(String args[]){
String str = "Test";
System.out.println(str.isBlank());
}
}

Output:

false

Method:


public boolean isBlank()
Returns true if the string is empty or contains only white space codepoints, otherwise false.

Returns:
true if the string is empty or contains only white space codepoints, otherwise false

Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept