Java examples for java.lang:char
is Hexadecimal Digit
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { char c = 'a'; System.out.println(isHexadecimalDigit(c)); }//from w ww . j a v a 2 s . com public static boolean isHexadecimalDigit(char c) { return Character.isDigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); } }