单项选择题
下面的代码中方法unsafe()有异常发生,那么可以加在第一行的语句为( )。
if(unsafe())
//do something
else if(safe())
//do the other
Ⅰ:public void methodName()
Ⅱ:public void methodName() throw IOException
Ⅲ:public void methodName() throws IOException
Ⅳ:public void methodName() throws Exception
A.Ⅲ、Ⅳ
B.Ⅱ、Ⅲ、Ⅳ
C.Ⅰ、Ⅲ
D.Ⅰ、Ⅳ
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下列代码段的执行结果是( )。 public class Test public static void main(String args[]) String s1=new String( hello ); String s2=new String hello ); System.out.println(s1==s2); System.out.println(s1.equal(s2));
A.true false
B.true true
C.false true
D.false false
点击查看答案&解析
单项选择题
下面程序的输出结果是( )。 public class Sun public static void main(String args[]) int[]a=1,2,3,4; int j=1,s=0; for(int i=3;i>=0;i--) s=s+a[i]*j; j=j*10; System.out.println(s);
A.1234
B.21
C.43
D.4321
点击查看答案&解析
相关试题
Java源程序是由类定义组成的,每个程序中可...
下列Applet在窗口中实现一个不可编辑的Text...
赋值表达式的组成是:在赋值运算符的左边是...
每个Applet必须定义为 【13】 的子类。
阅读下面程序段,SelectItem应用程序显示从...