I want to make a check that find if a string only contains whitespace characters.
I added this: "String".matches("\\s")
This work as long as the strings length is equal to 1. If the string contains two or more spaces(or a tabb space), it will fail.
Edit: Never mind. I found a way, by calling string.trim () and then string.isEmpty ().