2:46 am - Tuesday April 23, 2019

Character Example Program for isdigit(int code point)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

/**
@Author:Candid
@discription:Character Example Program for isDigit(int codePoint)
**/

public class Unicode
{
static int[] unicodeList = {0x37, 0x0667, 0x2166, 0x3286, 0x4E03, 0x1F108};//Initialize array
public static void main(String[] arg)
{
try
{
for (int i=0; i<unicodeList.length; i++)
{

int codePoint  = unicodeList[i];

System.out.println("isDigit():" +Character.isDigit(codePoint));//getting unicode chartype
}
}
catch (Exception e)
{
System.out.print("\n"+e.toString());
}
}
}

Output:

   isDigit():true
   isDigit():true
   isDigit():false
   isDigit():false
   isDigit():false

Filed in: Z-A All Java Codes

Comments are closed.