package com.te.exp;
/**
* finally 的使用
*/
public class StudyExcep {
public static void main(String[] args) {
try {
int[] arr = new int[3];
arr[3] = 100;
System.out.println("资源释放了。。。。");
}catch (Exception e){
e.printStackTrace();
System.out.println("报错了 ");
}finally {
System.out.println("无论结果如何,资源一定要释放");
}
}
}
标签:exception,arr,int,System,finally,使用,println,out
From: https://www.cnblogs.com/ch2020/p/16852416.html