public static int string2int(String s) { int result = 0; try{ result = Integer.parseInt(s); }catch(Exception e){} return result; }