1 javaCopypublic class CheckCharAlpha {
2 public static void main(String[] args) {
3
4 boolean letterOrDigit = isAlphaNumeric('k');
5 System.out.println(letterOrDigit);
6 }
7
8 public static boolean isAlphaNumeric(char char1) {
9 return (char1 >= 'a' && char1 <= 'z') || (char1 >= 'A' && char1 <= 'Z') || (char1 >= '0' && char1 <= '9');
10 }
11}
12