Java Character.isDigit(int codePoint)

Syntax

Character.isDigit(int codePoint) has the following syntax.

public static boolean isDigit(int codePoint)

Example

In the following code shows how to use Character.isDigit(int codePoint) method.


public class Main{
   public static void main(String[] args) {
     int intChar = (int)'0';
     System.out.println(intChar);/*w  w  w .  java  2  s  .  c  om*/
     System.out.println(Character.isDigit(intChar));
   }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable