Java examples for java.lang:char
is Whitespace Letter
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { char ch = 'a'; System.out.println(isWhitespace(ch)); }//from w ww.j a va 2s. c o m public static boolean isWhitespace(char ch) { // return Character.isWhitespace(ch); switch (ch) { case ' ': case '\t': case '\n': case '\r': // what else? return true; } return false; } }