Java学习-动手动脑4

Java56

异常处理

```
public class SystemExitAndFinally {

public static void main(String[] args) {

    try {

        System.out.println("in main");

        throw new Exception("Exception is thrown in main");

        //System.exit(0);

    } catch (Exception e) {

        System.out.println(e.getMessage());

        System.exit(0);
输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长