Java 11 introduced six new methods into the String class.
1️⃣ isBlank()
2️⃣ lines()
3️⃣ repeat()
4️⃣ strip()
5️⃣ stripLeading()
6️⃣ stripTrailing()
These aren’t static methods. So if your String reference is null, then calling isBlank() will be an NPE.
Mar 30, 2022 · 3:01 PM UTC


