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

正文內(nèi)容

面向?qū)ο蟪绦蛟O(shè)計(jì)習(xí)題(參考版)

2025-06-10 22:50本頁面
  

【正文】 } ()。 i。 // 獲得包含字符串s中各字符編碼的字節(jié)數(shù)組 byte[] b = ()。import .*。 } return 0。 return 1。 } public int amethod() { try { FileInputStream dis = new FileInputStream()。public class Mine { public static void main(String argv[]){ Mine m = new Mine()。 D) new DataOutputStream(new FileOutputSream())。 B) new DataOutputStream(new OutputStream())。 E) new InputStreamReader()。 C) new InputStreamReader(new BufferedReader(data))。 下面哪個(gè)表達(dá)式能夠創(chuàng)建一個(gè)InputStreamReader流?A) new InputStreamReader(new FileInputStream(data))。C) FileInputStream in=new FileReader(new File(“”))。第10章 輸入與輸出一、選擇題 ? A) InputStream in=new FileInputStream(“”)。C) RunHandler必須提供run()方法,該方法的訪問級(jí)別為public、返回類型為void。 }}A) 。 為使下面程序合法,下面有關(guān)RunHandle的陳述哪些是正確的?class Test { public static void main(String[] args) { Thread t = new Thread(new RunHandler())。C) ()。 } void start(int i) { }}A) (running)。 //A } public void run() { (running)。class RunTest implements Runnable { public static void main(String[] args) { RunTest rt = new RunTest()。E) notify()方法調(diào)用只能出現(xiàn)在while循環(huán)語句中。C) notify()方法定義在Thread類中。 }}A) 編譯錯(cuò) B) 能被編譯,運(yùn)行時(shí)沒有內(nèi)容輸出C) 能被編譯,運(yùn)行時(shí)輸出:hi D) 能被編譯,運(yùn)行時(shí)連續(xù)輸出:hi,直至用戶按下controlc鍵 下面有關(guān)與wait()配合使用的notify()方法的陳述,哪些是正確的?A) 如果有多個(gè)線程在等待一個(gè)條件,那么等待時(shí)間最長的線程被喚醒。 ()。 }} A) 編譯出錯(cuò) B) 運(yùn)行出錯(cuò)C) 運(yùn)行時(shí)不輸出任何內(nèi)容 D) 輸出:Executing Runnable Interface Thread 分析下面代碼行,選擇一個(gè)正確的陳述。 Thread t = new Thread (rt)。}請(qǐng)問當(dāng)方法trythis()被執(zhí)行時(shí),如果方法problem()拋出類Exception 的一個(gè)實(shí)例,那么哪些內(nèi)容將被輸出?A) 1 B) 2 C) 3 D) 4 E) 5第9章 線程與同步一、選擇題 編譯、運(yùn)行下面應(yīng)用程序會(huì)發(fā)生什么?public class RThread implements Runnable { public void run (String s ) { (Executing Runnable Interface Thread)。 }finally { (4)。 }catch(Exception x) { (3)。 }catch(RuntimeException x) { (2)。 }}A) 編譯錯(cuò) B) 輸出s = 30C) 輸出s = 45 D) 輸出s = 50 給定以下代碼: public void trythis() { try { (1)。 } finally { i = i + 2。 continue。22) }23) }24) }D) caught : demo in AAAB) caught : demo in BBBC) caught : demo in CCCD) caught . RuntimeException: demo in CCC 編譯和運(yùn)行以下程序會(huì)發(fā)生什么?class Test { public static void main(String args[]) { int s = 0, i = 1。 15) } 16) }17) public static void main(String args[]) {18) try {19) m1()。10) } catch(ArrayIndexOutOfBoundsException e1) {11) (caught + e + in AAA)。 5) } catch(ArithmeticException e) { 6) try { 7) throw new ArithmeticException()。第8章 例外處理一、選擇題 下面兩個(gè)類分別定義在不同的源文件中:1) public class Test1 {2) public void method() throws IOException{}3) }1) public class Test2 extends Test1{2) … 3) }請(qǐng)問下面哪些方法可以分別放置在類Test2的第2行處?其中Axn和Bxn都是都是IOException類的子類。C) i[a] = ((int)(x[a]))。8) }9) }10) }運(yùn)行程序時(shí)的輸出結(jié)果如下:11109為實(shí)現(xiàn)上述輸出結(jié)果,下面哪行代碼應(yīng)該插入在第6行處?A) i[a] = (x[a])。a ()。4) int i[] = new int[3]。B) 輸出:Count is 0C) 拋出例外:ArrayIndexOutOfBoundsException,程序停止。}public int getCount(int n){ return count[n]。}public void setCount(int ct,int n){ count[n]=ct。 }}A) 編譯出錯(cuò):數(shù)組類型無效B) 編譯出錯(cuò):數(shù)組元素count[0]沒有被初始化C) 先輸出null,然后引發(fā)ArrayIndexOutOfBoundsExceptio例外D) 先輸出一個(gè)表示數(shù)組對(duì)象的字符串,然后輸出0
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)教案相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1