package yichang; import java.util.*; public class Test1 { public static void main(String[] args) { // TODO 自动生成的方法存根 Scanner sc=new Scanner(System.in); try { int a=3,b=4; int c=a+b; System.out.println("运算结果为:"+c); } catch(Exception ex) { ex.printStackTrace(); System.out.println("运算结果出现异常"+ex.getMessage()); } System.out.println("完毕"); } }