finally features and functions keys

finally: controlled finally seeing the body will perform the
format:

try...catch...finally...
	String s="2020-3-11";
		SimpleDateFormat sd=new SimpleDateFormat("yyyy-MM-dd");
		
		Date d=null;
		try{
			d=sd.parse(s);
		}catch(Exception e){
			e.printStackTrace();
		}finally{
			System.out.println("这里的代码一定会执行");
		}
		System.out.println(d);

B: for releasing resources in the I / O operations and data flow operations will see

He published 188 original articles · won praise 10 · views 10000 +

Guess you like

Origin blog.csdn.net/Ting1king/article/details/104880119