下面程序存在语法错误,做出正确修改的选项是( )。 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){}