CharUtils { public static boolean isNumeric(char a) { return a >= '0' && a <= '9'; } private  CharUtils(); static boolean isHex(char a); static boolean isAlpha(char a); static boolean isNumeric(char a); static boolean isAlphaNumeric(char a); static boolean isUnreserved(char a); static boolean isDot(char a); static boolean isWhiteSpace(char a); static String[] splitByDot(String input);  }
@Test public void testCharUtilsIsNumeric() { char[] arr = { '0', '4', '6', '9' }; for (char a : arr) { Assert.assertTrue(CharUtils.isNumeric(a)); } char[] arr2 = { 'a', '~', 'A', 0 }; for (char a : arr2) { Assert.assertFalse(CharUtils.isNumeric(a)); } }