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
Post a Comment