public static void main(String[] args) { String a = "1s"; try { stringToInt(a); }catch (NumberFormatException e){ // e.printStackTrace(); System.out.println("bad input"); }finally { System.out.println("end"); }}public static int stringToInt(String s){ return Integer.parseInt(s);}
Sign in to make a reply
小kai天天要抱咩咩咩