62,612
社区成员
发帖
与我相关
我的任务
分享
public class Prac1{
public static void f() throws TestException{
System.out.println("throw exception from f()");
throw new TestException("!!!warning!!!");
}
public static void main(String[] args){
try{
f();
} catch(TestException te){
System.out.println(te.getMessage());
}
try{
String s = null;
s.length();
} catch(Exception e){
System.out.println(e);
}
finally{
System.out.println("into finally");
}
}
}