Copyright © tutorialspoint.com

Java - isDigit() Method

previous next


Description:

The method determines whether the specified char value is a digit.

Syntax:

boolean isDigit(char ch)

Parameters:

Here is the detail of parameters:

Return Value :

Example:

public class Test{
   public static void main(String args[]){
      System.out.println( Character.isDigit('c'));
      System.out.println( Character.isDigit('5'));
   }
}

This produces following result:

false
true

previous next

Copyright © tutorialspoint.com