In Java:
if (!Character.isWhitespace(ch)){
System.out.println("ch is neither a new line, space, nor a tab character");
}
else {
System.out.println("ch is a new line, space, or a tab character.");
Just put this if block wherever you need it.
6.0m questions
7.8m answers