Use Character.isDigit to check the if a char is a digit
class MainCLass {
publicstaticvoid main(String[] args) {
System.out.println("Is the Latin symbol 6 a digit? " + Character.isDigit('6'));
System.out.println("Is the Tamil symbol corresponding to "
+ "Unicode value '\\u0beb' a digit? " + Character.isDigit('\u0beb'));
System.out.println("Is the Greek symbol Omega a digit? " + Character.isDigit('\u03a9'));
System.out.println("Is the Latin symbol A a digit? " + Character.isDigit('A'));
}
}