试题答案

3773考试网计算机等级考试试题答案正文

[组图]2009年9月全国计算机等级考试二级Java真题试题

来源:fjzsksw.com 2010-4-7 12:26:17

 

  (17)下列表达式中,类型可以作为int型的是
  A)“abc”+”efg”
  B)“abc”+’efg’
  C)‘a’+’b’
  D)3+”4”
  
  (18)阅读下列程序
  Public class Test implements Runnable{
  Private int x=0;
  Private int y=o;
  boolean flag=true;
  Public static void main(string[ ] args) {
  Test  r =new Test( );
  Thead t1=new Thead(r);
  Thead t2=new Thead(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)值都出现两次。
  B)每行的(x,y)中,可能有;每一对(x,y)值仅出现一次。
  C)每行的(x,y)中,可能有x=y;每一对(x,y)值都出现两次。
  D)每行的(x,y)中,可能有x=y;每一对(x,y)值都出现一次。

 

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

触屏版 电脑版
3773考试网 琼ICP备12003406号-1