At first glance, this may seem unimaginable. Perhaps this is so, but I have something that I can miss something. The first Java documentation for Character.isWhitespace seems to exclude it. The definition of what is and is not allowed as a space seems very definite ("if and only if"), and the first line does not mean inextricable space.
I always thought of the usual "space" - this is what you get when you press the spacebar - as inextricable space .
So where does it fit on the list? The list is considered final in the highest ranking answer to this question - am I just reading it wrong? Also, the first commenter on the top answer on this question seems to be in doubt (in a different context). However, when I create a simple bit of code for testing, it indicates that normal space is an instance of spaces, as you would expect.
import static java.lang.Character.isWhitespace; public class WhitespaceCheck { public static void main(String[] args) { Character test = ' '; if (Character.isWhitespace(test)) { System.out.println("Is whitespace!" ); } else { System.out.println("Is not whitespace!" ); } } }
So, am I reading the first item in the list incorrectly, is it somewhere else in the list, or is the list itself simply wrong?
source share