首页javacharJava Data Type - 如何是白色空间

Java Data Type - 如何是白色空间

我们想知道如何是白色空间。

isWhitespace():true if the argument is whitespace.

which is any one of the following characters:

space (' '), tab ('\t'), newline ('\n'), carriage return ('\r'),form feed ('\f')

public class MainClass { public static void main(String[] args) { char symbol = 'A'; if (Character.isWhitespace(symbol)) { System.out.println("true"); }else{ System.out.println("false"); } } }