![]() |
VOOZH | about |
The java.lang.Character.isLetterOrDigit(char ch) method is an inbuilt method in Java that checks whether a given character is either a letter or a digit.
true
Explanation: This example checks whether the character 'A' is a letter or digit.
public static boolean isLetterOrDigit(char ch)
Example 1: Checking Letter and Digit Characters
Z is a letter/digit ? true 2 is a letter/digit ? true
Explanation: Both 'Z' (a letter) and '2' (a digit) satisfy the condition, so the method returns true.
Example 2: Checking Letter and Special Character.
D is a letter/digit ? true / is a letter/digit ? false
Explanation: