欧美一级a看免费观看,一本在线视频在线观看,国产偷自拍对白在线视频,精品欧美一区二区在线观看

    1. <dfn id="ktbui"><var id="ktbui"></var></dfn>
    2. 您當(dāng)前位置: 唯學(xué)網(wǎng) » 計(jì)算機(jī)等級考試培訓(xùn) » 備考試題專題

      計(jì)算機(jī)等級考試二級JAVA考試精選選擇題(4)

      來源:唯學(xué)網(wǎng)•教育培訓(xùn)(www.jscs8.com)  【唯學(xué)網(wǎng) • 中國教育電子商務(wù)平臺】 加入收藏

      2014年上半年(第39次)全國計(jì)算機(jī)等級考試將于2014年3月29日—31日舉行,網(wǎng)上報(bào)名將于2014年2月18日開始。離2014年計(jì)算機(jī)等級考試還有近一個月的時間,參加計(jì)算機(jī)等級二級JAVA的考生,應(yīng)該詳細(xì)了解考試大綱,按照考試大綱進(jìn)行復(fù)習(xí)。

      31.下列選項(xiàng)成員變量聲明正確的是( )。

      A.public protected final int i;

      B.abstract class Fl{…}

      C.private double height;

      D.double weight()

      32.下面程序段的輸出結(jié)果是( )。

      class Test{

      public s,tatic void main(String args[]){

      MyThread t=new MyThread();

      t.displayOutput("t has been createD");

      t.start();

      }

      }

      Class MyThread extends Thread{

      public void displayOutput(String s){

      System.out.println(s);

      }

      public void run(){

      displayOutput("t is running.");

      }

      }

      A.t has been created.

      B.t has been created. t is running.

      C.t is running.

      D.編譯出錯

      33.執(zhí)行下列程序時,會產(chǎn)生什么異常( )。

      public class Test{

      public static void main(String args[]){

      int d=101;

      int b=220:

      long a=321;

      System.OUt.println((a-b)/(a-b-d));

      }

      }

      A.ArraylndexOutOfBoundsException

      B.NumberFormatException

      C.ArithmeticException

      D.EOFExeeption

      34.下面程序段的輸出結(jié)果為( )。

      public class Test

      {

      public static void main(String args[])

      {

      booleana,b,C;

      a=(3<5):

      b=(a= =true);

      System.out.println("a="+a+"b="+b);

      c=(b= =false);

      System.out.println("b="+b+"c="+c);

      }

      }

      A.a=true b=false B.fl=true b=false

      b=true c=true b=true c=false

      C.a=true b=true D.a=false b=false

      b=true c=false b=true c=false

      35.下面程序段的輸出結(jié)果是( )。

      public class Test{

      public static void main(String args[]){

      int a,b;

      for(a=1,b=1;a<=100;a++){

      if(b>=10)break;

      if(b%2= =1){

      b+=2:

      continue;

      }

      }

      System.OUt.println(a);

      }

      }

      A.5 B.6

      C.7 D.101

      36.棧中允許進(jìn)行插入和刪除的一端稱為( )。

      A.棧頂 B.棧底

      C.棧端 D.棧尾

      37.下面程序段的輸出結(jié)果是( )。

      public class Test{

      public static void main(String args[]){

      int i=1:

      switch(i){

      case0:

      System.OUt.println("0");

      break;

      casel:

      System.out.println("1");

      case2:

      System.OUt.println("2");

      break;

      default:

      System.out.println("default");

      }

      }

      }

      A.01

      B.12

      C.10

      D.21

      38.Frame默認(rèn)的布局管理器是( )。

      A.FlowLayout

      B.BorderLayout

      C.GridLayout

      D.UpLayout

      39.在Java語言中,ObjectOutputStream是指( )。

      A.字節(jié)流

      B.字符流

      C.對象輸出流

      D.數(shù)據(jù)流

      40.請閱讀下列程序代碼,然后將程序的執(zhí)行結(jié)果補(bǔ)充完整。橫線處應(yīng)填寫的內(nèi)容是( )。

      程序代碼:

      public class throwsExeeption{

      static void Proc(intsel)

      throws Arithmetic Exception,Array Index Out Of

      Bounds Exception{

      System.out.println("InSituation"+sel);

      if(sel= =0){

      System.OUt.println("noException caught");

      return;

      }

      else if(sel= =l){

      int iArray[]=newint[4];

      iArray[1]=3;

      }

      }

      public static void main(String args[]){

      try{

      Proe(O);

      Proc(1);

      }

      catch(Array Index Out Of Bounds Exception e){

      System.out.println("Catch"+e);

      }

      finally{

      System.out.println("inProcfinally"):

      }

      }

      }

      執(zhí)行結(jié)果:

      In Situation 0

      no Exception caught

      in Proc finally

      A.In Situation l

      B.In Situation

      C.with Catch

      D.int iArray l

      在計(jì)算機(jī)培訓(xùn)欄目中還有計(jì)算機(jī)等級考試培訓(xùn) 一級和三級的考試輔導(dǎo)資料,想獲得更多的資料,請點(diǎn)擊唯學(xué)網(wǎng)計(jì)算機(jī)培訓(xùn)欄目,祝考生能順利通過考試。

      0% (0)
      0% (10)
      已有條評論