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

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations