



下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、姓名:_ 班級:_ 學(xué)號:_-密-封 -線- scjp模擬試題(2)考試時(shí)間:120分鐘 考試總分:100分題號一二三四五總分分?jǐn)?shù)遵守考場紀(jì)律,維護(hù)知識尊嚴(yán),杜絕違紀(jì)行為,確??荚嚱Y(jié)果公正。q36whichofthefollowingmethodsaredefinedonthegraphicsclass:drawline(int,int,int,int) drawimage(image,int,int,imageobservq36whichofthefollowingmethodsaredefinedonthegraphicsclass:drawline(int,int,int,int)dra
2、wimage(image,int,int,imageobserver)drawstring(string,int,int)add(component);setvisible(boolean);setlayout(object);selectallcorrectanswersq37whichofthefollowinglayoutmanagershonoursthepreferredsizeofacomponent:cardlayoutflowlayoutborderlayoutgridlayoutselectallcorrectanswersq38giventhefollowingcodewh
3、atistheeffectofabeing5:publicclasstestpublicvoidadd(inta)loop:for(inti1;i3;i)for(intj1;j3;j)if(a5)breakloop;systemoutprintln(i*j);generatearuntimeerrorthrowanarrayindexoutofboundsexceptionprintthevalues:1,2,2,4producesnooutputselectthemostappropriateanswerq39whatistheeffectofissuingawait( )methodona
4、nobjectifanotify( )methodhasalreadybeensenttothatobjectthenithasnoeffect#p#theobjectissuingthecalltowait( )willhaltuntilanotherobjectsendsanotify( )ornotifyall( )methodanexceptionwillberaisedtheobjectissuingthecalltowait( )willbeautomaticallysynchronizedwithanyotherobjectsusingthereceivingobjectsele
5、ctthemostappropriateanswerq40thelayoutofacontainercanbealteredusingwhichofthefollowingmethods:setlayout(alayoutmanager);addlayout(alayoutmanager);layout(alayoutmanager);setlayoutmanager(alayoutmanager);selectallcorrectanswersq41usingaflowlayoutmanager,whichisthecorrectwaytoaddelementstoacontainer:ad
6、d(component);add(”center”,component);add(x,y,component);set(component);selectthemostappropriateanswerq42giventhatabuttoncangenerateanactioneventwhichlistenerwouldyouexpecttohavetoimplement,inaclasswhichwouldhandlethisevent?focuslistenercomponentlistenerwindowlisteneractionlisteneritemlistenerselectt
7、hemostappropriateanswerq43whichofthefollowing,arevalidreturntypes,forlistenermethods:booleanthetypeofeventhandledvoidcomponentselectthemostappropriateanswerq44assumingwehaveaclasswhichimplementstheactionlistenerinterface,whichmethodshouldbeusedtoregisterthiswithabutton?addlistener(*);addactionlisten
8、er(*);addbuttonlistener(*);setlistener(*);selectthemostappropriateanswerq45inordertocausethepaint(graphics)methodtoexecute,whichofthefollowingisthemostappropriatemethodtocall:paint( )repaint( )paint(graphics)update(graphics)noneyoushouldnevercausepaint(graphics)toexecuteselectthemostappropriateanswe
9、rq46whichofthefollowingillustratesthecorrectwaytopassaparameterintoanapplet:utstreamreader(newfileinputstream(”data”);#p#newinputstreamreader(newfilereader(”data”);newinputstreamreader(newbufferedreader(”data”);newinputstreamreader(”data”);newinputstreamreader(systemin);selectallcorrectanswersq48wha
10、tisthepermanenteffectonthefilesystemofwritingdatatoanewfilewriter(”report”),giventhefilereportalreadyexists?thedataisappendedtothefilethefileisreplacedwithanewfileanexceptionisraisedasthefilealreadyexiststhedataiswrittentorandomlocationswithinthefileselectthemostappropriateanswerq49whatistheeffectofaddingthesixthelementtoavectorcreatedinthefollowingmanner:newvector(5,10);anindexoutofboundsexceptionisraisedthevectorgrowsinsizetoacapacityof10elementsthevectorgrowsinsizetoacapacityof15elementsnothin
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 四川幼兒師范高等??茖W(xué)校《大地測量學(xué)實(shí)驗(yàn)》2023-2024學(xué)年第二學(xué)期期末試卷
- 晉中師范高等專科學(xué)?!毒W(wǎng)絡(luò)及其計(jì)算》2023-2024學(xué)年第二學(xué)期期末試卷
- 福建對外經(jīng)濟(jì)貿(mào)易職業(yè)技術(shù)學(xué)院《大學(xué)生勞動教育》2023-2024學(xué)年第二學(xué)期期末試卷
- 天津藝術(shù)職業(yè)學(xué)院《文獻(xiàn)目錄與信息檢索》2023-2024學(xué)年第二學(xué)期期末試卷
- 2025海南省安全員A證考試題庫及答案
- 貴州中醫(yī)藥大學(xué)時(shí)珍學(xué)院《安全經(jīng)濟(jì)學(xué)》2023-2024學(xué)年第二學(xué)期期末試卷
- 2024-2025學(xué)年遼寧省七校協(xié)作體高一上學(xué)期12月月考?xì)v史試卷
- 2025江西省建筑安全員-A證考試題庫及答案
- 漯河醫(yī)學(xué)高等??茖W(xué)?!秺W林匹克文化》2023-2024學(xué)年第二學(xué)期期末試卷
- 遼寧輕工職業(yè)學(xué)院《阿拉伯文學(xué)選讀》2023-2024學(xué)年第二學(xué)期期末試卷
- 2024年消防初級考試模擬試題和答案
- 小學(xué)五年級奧數(shù)競賽試題(含答案)
- Unit-3-Reading-and-thinking課文詳解課件-高中英語人教版必修第二冊
- 品牌服裝設(shè)計(jì)課件
- 小學(xué)六年級美術(shù)期末試卷及答案課件
- DB11T 381-2023既有居住建筑節(jié)能改造技術(shù)規(guī)程
- NB-T 47013.7-2012(JB-T 4730.7) 4730.7 承壓設(shè)備無損檢測 第7部分:目視檢測
- 統(tǒng)編版高中語文必修下冊 第一單元單元學(xué)習(xí)任務(wù) 課件
- 新版出口報(bào)關(guān)單模板
- 幼兒園衛(wèi)生保健十三種表格
- 大灰狼兒童睡前故事大全
評論
0/150
提交評論