public class systemInException {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
try {
int i=s.nextInt();
System.out.println(i);
System.out.println("dddd");
} catch (Exception e) {
e.printStackTrace();
}
throw new RuntimeException("自己抛出异常");
}
}
运行后输入123,有时结果是这样
有时是这样
还有时候是这样
好绝望啊,本人小白,求大神指点~是不是线程的问题,不太懂,同一段代码运行多次居然结果不同。。。好蒙