带管理后台的网站,深圳建设工程交易,网站建设的源代码,建设医药网站前要做什么审核第一个格式#xff1a; try{}catch(){} 第二个格式#xff1a; try{}catch(){}finally{} 第三个格式#xff1a; try{}finally{} 注意#xff1a;catch是用于处理异常#xff0c;如果没有catch就代表异常没有被处理过#xff0c;如果该异常是检测时异常#xff0c;那么必… 第一个格式 try{}catch(){} 第二个格式 try{}catch(){}finally{} 第三个格式 try{}finally{} 注意catch是用于处理异常如果没有catch就代表异常没有被处理过如果该异常是检测时异常那么必须声明。 package com.dreamy.day04;/*** author dreamy**/
class Demo04{public void method() {try {throw new Exception();}/*catch(Exception e) {try {throw e;}catch(){}}*/finally {//错误没被处理所以编译出错//关闭资源}}
}
public class ExceptionDemo04 {public static void main(String[] args) {}} 转载于:https://www.cnblogs.com/zhaohuan1996/p/8045181.html