Character.isLetterOrDigit() in Java with examples Last Updated : 06 Dec, 2018 Comments Improve Suggest changes Like Article Like Report The java.lang.Character.isLetterOrDigit(char ch) is an inbuilt method in java which determines if the specified character is a letter or digit. Syntax: public static boolean isLetterOrDigit(char ch) Parameters: The function accepts a single mandatory parameter ch which signifies the character to be tested. Return value: This function returns a boolean value. The boolean value is true if the character is a letter or digit else it false. Below programs illustrate the above method: Program 1: Java // Java program to illustrate the // Character.isLetterOrDigit() method import java.lang.*; public class GFG { public static void main(String[] args) { // two characters char c1 = 'Z', c2 = '2'; // Function to check if the character is letter or digit boolean bool1 = Character.isLetterOrDigit(c1); System.out.println(c1 + " is a letter/digit ? " + bool1); // Function to check if the character is letter or digit boolean bool2 = Character.isLetterOrDigit(c2); System.out.println(c2 + " is a letter/digit ? " + bool2); } } Output: Z is a letter/digit ? true 2 is a letter/digit ? true Program 2: Java // Java program to illustrate the // Character.isLetterOrDigit() method import java.lang.*; public class GFG { public static void main(String[] args) { // assign character char c1 = 'D', c2 = '/'; // Function to check if the character is letter or digit boolean bool1 = Character.isLetterOrDigit(c1); System.out.println(c1 + " is a letter/digit ? " + bool1); // Function to check if the character is letter or digit boolean bool2 = Character.isLetterOrDigit(c2); System.out.println(c2 + " is a letter/digit ? " + bool2); } } Output: D is a letter/digit ? true / is a letter/digit ? false Reference: https://docs.oracle.com/javase/7/docs/api/java/lang/Character.html#isLetterOrDigit(char) Comment More infoAdvertise with us T Twinkl Bajaj Follow Improve Article Tags : Misc Java Java-lang package Java-Functions Java-Character +1 More Practice Tags : JavaMisc Similar Reads Character.isMirrored() in Java with examples The Character.isMirrored() method in Java is a built-in method of the java.lang.Character class. This method is used to check if a character is mirrored according to the Unicode specification. Mirrored characters are those whose glyphs are horizontally mirrored when displayed in right-to-left (RTL) 3 min read Character.isTitleCase() in Java with examples The java.lang.Character.isTitleCase() in an inbuilt method in java which determines if the specified character is a titlecase character or not. A character is a titlecase character if its general category type, provided by getType(codePoint), is a TITLECASE_LETTER. Some characters look like pairs of 2 min read Character.isISOControl() method with examples in Java The java.lang.Character.isISOControl() is an inbuilt method in java which determines if the specified character is an ISO control character or not. A character is considered to be an ISO control character if its code is in the range â\u0000â through â\u001Fâ or in the range â\u007Fâ through â\u009Fâ 3 min read Character.isJavaIdentifierPart() Method in Java with Examples The Character.isJavaIdentifierPart(int codePoint) is an inbuilt method in java that determines if the specified character may be part of a Java identifier as other than the first character. A character may be a part of Java identifier if any of the following are true: it is a letter it is a currency 4 min read Character.digit() in Java with examples The java.lang.Character.digit() is an inbuilt method in java which returns the numeric value of the character ch in the specified radix. It returns -1 if the radix is not in the range MIN_RADIX or if the value of ch is not a valid digit in the specified radix. A character is a valid digit if at leas 3 min read Like