多项选择题

下面程序存在语法错误,做出正确修改的选项是( )。
public class Test{
public static void main(String[] args){
Exception e = new NullPointerException();
if(true) throw e;
System.out.println(“The End”);

A.修改Exception e = new NullPointerException();为:Exception e = new Exception();
B.修改Exception e = new NullPointerException();为:NullPointerException e = new NullPointerException();
C.修改throw e;为:try{throw e;}catch(Exception e){}
D.修改throw e;为:try{throw e;}catch(NullPointerException e){}
题目列表

你可能感兴趣的试题

单项选择题

A.
B.
C.
D.
微信扫码免费搜题