freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

java選擇題100道-資料下載頁

2025-03-24 04:57本頁面
  

【正文】 rotected method(int i)C)public static method(String s)D)protected static void method(Integer i)15. 下面的方法,當輸入為2的時候返回值是多少?( D ) public int getValue(int i) { int result = 0。 switch (i) { case 1: result = result + i。 case 2: result = result + i * 2。 case 3: result = result + i * 3。 } return result。 }A)0 B)2 C)4 D)1016. getCustomerInfo()方法如下,try中可以捕獲三種類型的異常,如果在該方法運行中產(chǎn)生了一個IOException,將會輸出什么結果( A ) public void getCustomerInfo() { try { // do something that may cause an Exception } catch ( ex){ (FileNotFoundException!)。 } catch ( ex){ (IOException!)。 } catch ( ex){ (Exception!)。 } }A)IOException!B)IOException!Exception!C)FileNotFoundException!IOException!D)FileNotFoundException!IOException!Exception!17. 新建一個流對象,下面哪個選項的代碼是錯誤的?( B )A)new BufferedWriter(new FileWriter())。B)new BufferedReader(new FileInputStream())。C)new GZIPOutputStream(new FileOutputStream())。D)new ObjectInputStream(new FileInputStream())。18. 。選項中哪個方法不是Collection接口所定義的?( C )A)int size()B)boolean containsAll(Collection c)C)pareTo(Object obj)D)boolean remove(Object obj)19. 一個線程在任何時刻都處于某種線程狀態(tài)(thread state),例如運行狀態(tài)、阻塞狀態(tài)、就緒狀態(tài)等。一個線程可以由選項中的哪種線程狀態(tài)直接到達運行狀態(tài)?( D )A)死亡狀態(tài)B)阻塞狀態(tài)(對象lock池內)C)阻塞狀態(tài)(對象wait池內)D)就緒狀態(tài)20. 選項中哪一行代碼可以替換題目中//add code here而不產(chǎn)生編譯錯誤?( A )public abstract class MyClass { public int constInt = 5。 //add code here public void method() { }}A)public abstract void method(int a)。B)value = value + 5。C)public int method()。D)public abstract void anotherMethod() {}21. File類是IO包中唯一表示磁盤文件信息的對象,它定義了一些與平臺無關的方法來操縱文件。通過調用File類提供的各種方法,我們能夠創(chuàng)建、刪除文件、重命名文件、判斷文件的讀寫權限及是否存在,設置和查詢文件的最近修改時間等。下面的代碼片段實現(xiàn)的是什么功能?( B )File file = new File(C:\\)。 if (()) { ()。 }A)創(chuàng)建C:\。B) 刪除C:\。C) 打開C:\。D) 移動C:\22. 閱讀Shape和Circle兩個類的定義。在序列化一個Circle的對象circle到文件時,下面哪個字段會被保存到文件中? ( B )class Shape { public String name。}class Circle extends Shape implements Serializable{ private float radius。 transient int color。 public static String type = Circle。}A)nameB)radiusC)colorD)type23. 下面是People和Child類的定義和構造方法,每個構造方法都輸出編號。在執(zhí)行new Child(mike)的時候都有哪些構造方法被順序調用?請選擇輸出結果 ( D )class People { String name。 public People() { (1)。 } public People(String name) { (2)。 = name。 }}class Child extends People { People father。 public Child(String name) { (3)。 = name。 father = new People(name + :F)。 } public Child(){ (4)。 }} A)312 B) 32C) 432 D) 13224. 下面哪個選項中的代碼沒有定義內部類,或者錯誤的定義了內部類? ( C )A)public Class Line { int length。 Class Point {//內部類代碼}}B) public Class Line { public Point getPoint() { return new Point(){//內部類代碼}。 }}C) public Class Line { //外部類代碼}Class Point {//內部類代碼}D) public Class Line { public int calcLength() { Class Point {//內部類代碼} }}25. list是一個ArrayList的對象,哪個選項的代碼填寫到//todo delete處,可以在Iterator遍歷的過程中正確并安全的刪除一個list中保存的對象?( D ) Iterator it = ()。 int index = 0。 while (()){ Object obj = ()。 if (needDelete(obj)) { //needDelete返回boolean,決定是否要刪除 //todo delete } index ++。 } A)(obj)。B)(index)。C)(())。D)()。 WORD格式整理
點擊復制文檔內容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1