Java Character .isLetterOrDigit (char ch)
Syntax
Character.isLetterOrDigit(char ch) has the following syntax.
public static boolean isLetterOrDigit(char ch)
Example
In the following code shows how to use Character.isLetterOrDigit(char ch) method.
public class Main {
public static void main(String[] args) {
char ch1 = 'A', ch2 = '1';
/* w w w . ja va 2 s .c om*/
boolean b1 = Character.isLetterOrDigit(ch1);
boolean b2 = Character.isLetterOrDigit(ch2);
System.out.println(b1);
System.out.println(b2);
}
}
The code above generates the following result.