Character.isWhitespace(char ch) has the following syntax.
public static boolean isWhitespace(char ch)
In the following code shows how to use Character.isWhitespace(char ch) method.
public class Main{ public static void main(String[] argv){ System.out.println("is white space:"+Character.isWhitespace('a')); System.out.println("is white space:"+Character.isWhitespace('\n')); System.out.println("is white space:"+Character.isWhitespace('\t')); } }
The code above generates the following result.