Java 11 introduced six new methods into the String class.
1️⃣ isBlank()
2️⃣ lines()
3️⃣ repeat()
4️⃣ strip()
5️⃣ stripLeading()
6️⃣ stripTrailing()
Mar 30, 2022 · 7:00 AM UTC
These aren’t static methods. So if your String reference is null, then calling isBlank() will be an NPE.
1
3
Absolutely. What I am looking for is a static method within the String class itself similar to StringUtils.isBlank.
1






