isBlank() vs isEmpty() in String class Java

isBlank() is a new method introduced in String class in Java. By naming isBlank() and isEmpty() methods look similar to each other, but there is a slight difference between them – isBlank() returns true for the string having only white space characters whereas isEmpty() will return false for such strings. Let us understand the difference … Read more