单项选择题

下列表达式中,类型可以作为int型的是

A."abe"+"efg"
B."abc"+"efg"
C.'a'+'b'
D.3+"4"
<上一题 目录 下一题>
热门 试题

单项选择题
阅读下面程序 public void test() try sayHello(); System.out.println( hello ); catch(ArrayIndexOutOfBoundException e) System.out.println( ArrayIndexOutOfBoundException ); catch(Exception e) System.out.println( Exception ); finally System.out.println( finally ); 如果sayHello()方法正常运行,则test()方法的运行结果将是
A.Hello
B.ArraylndexOutOfBondsException
C.Exception
 Finally
D.Hello
 Finally
单项选择题
阅读下面程序 public class Test implements Runnable private int x=0; private int y=0; boolean flag=true; public static void main(String[]args) Test r=new Test(); Thread t1=new Thread(r); Thread t2=new Thread(r); t1.start(); t2.start(); public void run() while(flag) x++;y++; System.out.println( ( +x+ , +y+ ) ); if(x >=10) flag=false; 下列对程序运行结果描述的选项中,正确的是
A.每行的(x,y)中,可能有x≠Y;每一对(x,y)值都出现两次
B.每行的(x,y)中,可能有x≠y;每一对(x,y)值仅出现一次
C.每行的(x,y)中,x=y;每一对(x,y)值都出现两次
D.每行的(x,y)中,x=y;每一对(x,y)值都出现一次
相关试题
  • 阅读下面程序 public class Test imple...
  • 在下面程序的空白处,应填入的正确选项是 ...
  • 下面程序的功能是统计字符串中“array”的...
  • 阅读下面程序 public void test() tr...
  • Java中的基本数据类型int在不同的操作系统...