Mega Code Archive

 
Categories / Java Tutorial / Data Type
 

Is White space

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");     }   } } false