" ".isEmpty() returns false, but " ".isBlank() returns true — whitespace counts as blank, not empty. 1" ".isEmpty(); // false — length is 1 2" ".isBlank(); // true — whitespace only (Java 11+) 3"abc".isBlank(); // false I caught myself writing s.trim().isEmpty() again today.
Read More