public class Demo { public static void main(String[] args) { // TODO Auto-generated method stub int n=0,m=0,t=555; try { m=Integer.parseInt("8888"); n=Integer.parseInt("abc789"); t=9999; }catch(NumberFormatException e){ System.out.println("发生异常"+e.getMessage()); e.printStackTrace(); n=123; } System.out.println("n="+n+",m="+m+",t="+t);
添加回答
举报
0/150
提交
取消