Character.isLetterOrDigit(char ch) has the following syntax.
public static boolean isLetterOrDigit(char ch)
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'; // ww w . j a v a 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.