• 2022-05-28
    读下面代码,哪个选项是正确的( )import java.io.*;public class Test2{public static void main(String []args)throws IOException{if(args[0]==”hello”)throw new IOException();}}
    A: 没有错误,程序编译正确
    B: 编译错误,不能够在main方法中抛出异常
    C: 编译错误,IOException是一个系统异常,不能够由application程序产生
    D: 没有输出结果
  • 举一反三