java is digit

Solutions on MaxInterview for java is digit by the best coders in the world

showing results for - "java is digit"
Carolina
27 Feb 2020
1The java.lang.Character.isDigit(char ch) is an inbuilt method in java
2which determines whether a specified character is a digit or not.
3
4   // two characters
5        char c1 = 'A', c2 = '4';
6  
7        // Function to check if the character
8        // is digit or not
9        System.out.println(
10            c1 + " is a digit -> "
11            + Character.isDigit(c1));
12        System.out.println(
13            c2 + " is a digit -> "
14            + Character.isDigit(c2));