久久久国产精品秘人口麻豆|永久免费AV无语国产|人成电影免费中文字幕|久久AV嫩草影院2

    1. <dfn id="yitbn"><samp id="yitbn"><progress id="yitbn"></progress></samp></dfn>

          <div id="yitbn"></div>

          1. 首頁 - 網(wǎng)校 - 萬題庫 - 美好明天 - 直播 - 導航
            您現(xiàn)在的位置: 考試吧 > 計算機等級考試 > 計算機二級考試 > JAVA > 模擬試題 > 正文

            2018年12月計算機二級Java考試沖刺題及答案(3)

            來源:考試吧 2018-11-27 17:55:14 要考試,上考試吧! 萬題庫
            “2018年12月計算機二級Java考試沖刺題及答案(3)”供考生參考。更多計算機等級考試模擬試題等信息請訪問考試吧計算機等級考試網(wǎng)。
            第 1 頁:試題
            第 2 頁:參考答案

              點擊查看:2018年12月計算機二級Java考試沖刺題及答案匯總

              1.下列選項成員變量聲明正確的是()。

              A.publicprotectedfinalinti;

              B.abstractclassFl{…}

              C.privatedoubleheight;

              D.doubleweight()

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

              classTest{

              publics,taticvoidmain(Stringargs[]){

              MyThreadt=newMyThread();

              t.displayOutput("thasbeencreateD");

              t.start();

              }

              }

              ClassMyThreadextendsThread{

              publicvoiddisplayOutput(Strings){

              System.out.println(s);

              }

              publicvoidrun(){

              displayOutput("tisrunning.");

              }

              }

              A.thasbeencreated.

              B.thasbeencreated.tisrunning.

              C.tisrunning.

              D.編譯出錯

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

              publicclassTest{

              publicstaticvoidmain(Stringargs[]){

              intd=101;

              intb=220:

              longa=321;

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

              }

              }

              A.ArraylndexOutOfBoundsException

              B.NumberFormatException

              C.ArithmeticException

              D.EOFExeeption

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

              publicclassTest

              {

              publicstaticvoidmain(Stringargs[])

              {

              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=trueb=falseB.fl=trueb=false

              b=truec=trueb=truec=false

              C.a=trueb=trueD.a=falseb=false

              b=truec=falseb=truec=false

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

              publicclassTest{

              publicstaticvoidmain(Stringargs[]){

              inta,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.5B.6

              C.7D.101

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

              A.棧頂B.棧底

              C.棧端D.棧尾

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

              publicclassTest{

              publicstaticvoidmain(Stringargs[]){

              inti=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

              8.Frame默認的布局管理器是()。

              A.FlowLayout

              B.BorderLayout

              C.GridLayout

              D.UpLayout

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

              A.字節(jié)流

              B.字符流

              C.對象輸出流

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

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

              程序代碼:

              publicclassthrowsExeeption{

              staticvoidProc(intsel)

              throwsArithmeticException,ArrayIndexOutOf

              BoundsException{

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

              if(sel==0){

              System.OUt.println("noExceptioncaught");

              return;

              }

              elseif(sel==l){

              intiArray[]=newint[4];

              iArray[1]=3;

              }

              }

              publicstaticvoidmain(Stringargs[]){

              try{

              Proe(O);

              Proc(1);

              }

              catch(ArrayIndexOutOfBoundsExceptione){

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

              }

              finally{

              System.out.println("inProcfinally"):

              }

              }

              }

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

              InSituation0

              noExceptioncaught

              inProcfinally

              A.InSituationl

              B.InSituation

              C.withCatch

              D.intiArrayl

            掃描/長按二維碼幫助考試通關(guān)
            2018年等考報考資訊
            2018等考各科通關(guān)技巧
            2018各科最新預測試卷
            2018等考各科備考資料

            微信搜索"考試吧"了解更多考試資訊、下載備考資料

              相關(guān)推薦:

              2018年12月全國計算機等級考試必做試題匯總

              2018年全國計算機等級考試必做試題匯總(各科目)

              各地2018年12月全國計算機等考準考證打印時間匯總

              2018年全國計算機等級考試復習知識點匯總(各科目)

              2018全國計算機等級考試備考經(jīng)驗及應(yīng)試技巧匯總

            文章搜索
            萬題庫小程序
            萬題庫小程序
            ·章節(jié)視頻 ·章節(jié)練習
            ·免費真題 ·模考試題
            微信掃碼,立即獲取!
            掃碼免費使用
            版權(quán)聲明:如果計算機等級考試網(wǎng)所轉(zhuǎn)載內(nèi)容不慎侵犯了您的權(quán)益,請與我們聯(lián)系800@eeeigo.com,我們將會及時處理。如轉(zhuǎn)載本計算機等級考試網(wǎng)內(nèi)容,請注明出處。
            在線模擬試題
            考證通關(guān)殺器
            考試最新資訊
            一次通關(guān)技巧