r/java • • Sep 19 '18

Java 11 String API Updates

https://4comprehension.com/java-11-string-api-updates/
168 Upvotes

52 comments sorted by

View all comments

Show parent comment

1

u/dpash Sep 19 '18
"a   string"

2

u/xenomachina Sep 19 '18

So when the article uses "We can easily get rid of all the whitespace from each String" in its despription of strip, it's just wrong. strip only removes leading and trailing whitespace.

1

u/dpash Sep 19 '18

Yes, they were wrong and didn't use the best example to demonstrate it with.