|
Is Letter
The following example shows how to use Character.isLetter() API.
|
package com.bethecoder.tutorials.core.character;
public class CharIsLetter {
/**
* @param args
*/
public static void main(String[] args) {
System.out.println(Character.isLetter('a'));
System.out.println(Character.isLetter('z'));
System.out.println(Character.isLetter('A'));
System.out.println(Character.isLetter('Z'));
System.out.println(Character.isLetter(' '));
System.out.println(Character.isLetter('\n'));
System.out.println(Character.isLetter('\t'));
System.out.println(Character.isLetter('6'));
}
}
|
| |
It gives the following output,
true
true
true
true
false
false
false
false
|
|