程序读入用户输入的一个值,要求创建一个自定义的异常,如果输入值大于10,使用throw语句显式地引发异常,异常输出信息为“something’s wrong!”, 语句为()。     

A . if ( i > 10 )   throw Exception(“something’s wrong!”); B . if ( i > 10 )   throw Exception e (“something’s wrong!”); C . if ( i > 10 )   throw new Exception(“something’s wrong!”); D . if ( i > 10 )  throw new Exception e ("something’s wrong!");

时间:2022-10-20 14:50:15 所属题库:java工程师信产部认证考试题库

相似题目