1public static boolean isNumeric(String strNum) {
2 if (strNum == null) {
3 return false;
4 }
5 try {
6 double d = Double.parseDouble(strNum);
7 } catch (NumberFormatException nfe) {
8 return false;
9 }
10 return true;
11}