package com.lovecoding.day13.finally01;

import java.util.Scanner;

public class Test01 {

    public static void main(String[] args) {
        //键盘输入
        Scanner scanner = null;
        try {
            scanner = new Scanner(System.in);
            int i = scanner.nextInt();
            System.out.println(i);
        } catch (Exception e){
            e.printStackTrace();
            int i = 1/0;
        } finally {
            int i = 1/0;
            System.out.println("关闭");
            scanner.close();
        }

        //finally： 必须要执行 释放资源 有异常同样不会执行

    }

}
