The method decides whether the particular char charge is a white space, which incorporates space, tab, or innovative lineup. isWhitespace() is an integral method in a java that resolves if the specified character (Unicode code point) is white space according to Java. ... It is a Unicode space character (SPACE_SEPARATOR, LINE_SEPARATOR, or PARAGRAPH_SEPARATOR) but is not also a non-breaking space ('\u00A0', '\u2007', '\u202F').
boolean isWhitespace(char ch)
Here is the detail of parameters −
public class Test { public static void main(String args[]) { System.out.println(Character.isWhitespace('c')); System.out.println(Character.isWhitespace(' ')); System.out.println(Character.isWhitespace('\n')); System.out.println(Character.isWhitespace('\t')); } }
false true true true
Here at Intellinuts, we have created a complete Java tutorial for Beginners to get started in Java.