程序读入用户输入的一个值,要求创建一个异常,如果输入值大于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-09-06 10:24:17 所属题库:java工程师信产部认证考试题库

相似题目