public static boolean isParsableToInt(String s) { try { Integer.parseInt(s); return true; } catch (NumberFormatException nfe) { return false; } }