YouTip LogoYouTip

Character Isdigit

# Java isDigit() Method [![Image 3: Java Character Class](#)Java Character Class](#) * * * The isDigit() method is used to determine whether the specified character is a digit. ### Syntax public static boolean isDigit(char ch) ### Parameters * **ch** -- the character to be tested. ### Return Value Returns true if the character is a digit; otherwise, returns false. ### Example public class Test {public static void main(String args[]) {System.out.println(Character.isDigit('c'));System.out.println(Character.isDigit('5'));}} The output of the above program is: falsetrue * * Java Character Class](#)
← Character IsuppercaseJs Mistakes β†’