char ch = 'a'; // Unicode 字符表示形式char uniChar = '\u039A'; // 字符数组char[] charArray ={ 'a', 'b', 'c', 'd', 'e' };
public class Test { public static void main(String args[]) { System.out.println(Character.isLetter('c')); System.out.println(Character.isLetter('5')); }}
public class Test { public static void main(String args[]) { System.out.println(Character.isDigit('c')); System.out.println(Character.isDigit('5')); }}
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')); }}
public class Test { public static void main(String args[]) { System.out.println( Character.isUpperCase('c')); System.out.println( Character.isUpperCase('C')); }}
public class Test { public static void main(String args[]) { System.out.println( Character.isLowerCase('c')); System.out.println( Character.isLowerCase('C')); }}
public class Test { public static void main(String args[]) { System.out.println(Character.toUpperCase('a')); System.out.println(Character.toUpperCase('A')); }}
public class Test { public static void main(String args[]) { System.out.println(Character.toLowerCase('a')); System.out.println(Character.toLowerCase('A')); }}
public class Test { public static void main(String args[]) { System.out.println(Character.toString('a')); System.out.println(Character.toString('A')); }}