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

正文內(nèi)容

java課堂練習(xí)題(專業(yè)版)

2024-09-26 19:06上一頁面

下一頁面
  

【正文】 hh:mm:ss z)。 i 。 i 。 x[j+1]=w。 else return (fibonacci(n1)+fibonacci(n2))。 } } class A { static int n=100。 該程序段輸出是什么 ? 2)若執(zhí)行前 ch1 的值為 39。 public static void main(String args[]) { (str1)。 int GetA(){return x。 b2 = true。 } } // public class B extends A{ float a=。 你的解答: public class MyFrame extends Frame implements Runnable 判斷題 和 c++都是面向?qū)ο蟮某绦蛟O(shè)計(jì)語言。 (outer)。 Aclass a1=new Bclass()。 } } A、 第一行會(huì)產(chǎn)生編譯錯(cuò)誤 B、 第六行會(huì)產(chǎn)生編譯錯(cuò)誤 C、 第六行會(huì)產(chǎn)生運(yùn)行錯(cuò)誤 D、 程序會(huì)運(yùn)行和啟動(dòng) 答案: A 要從文件 “ ” 文件中讀出第 10個(gè)字節(jié)到變量 C中 , 下列哪個(gè)方法適合 ?( ) A、 FileInputStream in=new FileInputStream()。a39。 }catch(SafeException e){ (Test 2)。int i=3。 C) y x1。 } } 第二部分 類和對(duì)象 既能作為類的修飾符 , 也能作為類成員的修飾符的是 ( ) A、 public B、 extends C、 Float D、 static 答案: A 下列選項(xiàng)中,用于定義接口的關(guān)鍵字是 ( ) A、 import B、 implements C、 interface D、 protected 答案: C 定義類頭時(shí)能使用的修飾符是 ( )。j++) (yanghui[i][j]+ )。 yanghui=new int[yhlevel][]。表達(dá)式 !(++a!=b)的值是_________(true) 構(gòu)造函數(shù) ______有返回值。//錯(cuò),下標(biāo)越界 B、 s[9] 為 null。 A) switch (x + y) B) switch ( ch + 1 ) { ...... } { ...... } C) switch ch D) switch ( a + b )。 i!=j。 switch( j i ) { case 8 : k++。 A、 一次也不執(zhí)行 B、 執(zhí)行 1 次 C、 無限次 D、 有語法錯(cuò),不能執(zhí)行 答案: B 設(shè) int 型變量 a、 b, float 型變量 x、 y, char 型變量 ch 均已正確定義并賦值 , 正確的 switch 語句是 ( )。amp。 boolean b=true。,ch2=39。 C、 char c = 39。 答案: B 答 案 A 和 C 的 i和 j 都需要進(jìn)行初始化后才能使用。 long j=456。 B、 byte b1= 15678。 C、 static int i=100。 C、 \n D、 39。 A) i = i + 2 B) a[0] = 7。 D、 Byte a = 120。 A、 12 B、 11 C、 10 D、 9 答案: C 下列語句序列執(zhí)行后, ch1 的值是 ( )。amp。result=2。 A) for 語句 B) while 語句 C) switch 語句 D) do__while 語句 答案: C 以下由 dowhile 語句構(gòu)成的循環(huán)執(zhí)行的次數(shù)是 ( ) int k = 0。 default: k=x*yx。 while( (m++) ( n) ) ++k。 true 。 } } 那個(gè)語句是正確的? ( ) A、 編譯時(shí)將產(chǎn)生錯(cuò)誤; B、 編譯時(shí)正確,運(yùn)行時(shí)將產(chǎn)生錯(cuò)誤; C、 輸出零; D、 輸出空。 i 5。 int yhlevel=10。 i。 } } for (int k=0。 A) class x { .... } B) class x extends y { .... } C) static class x implements y1,y2 { .... } D) public class x extends Applet { .... } 答案: C 靜態(tài)類不能實(shí)現(xiàn)接口 設(shè) x、 y 為已定義的類名,下列聲明 x類的對(duì)象 x1 的語句中正確的是 ( )。int i=3。 答案: A 和 C 定義一個(gè)類名為 的類,并且該類可被一個(gè)工程中的所有類訪問,那么該類的正確聲明應(yīng)為: ( ) A、 private class MyClass extends Object B、 class MyClass extends Object C、 public class MyClass D、 public class MyClass extends Object 答案: C 和 D 指出下列哪個(gè)方法與方法 public void add(int a){}為合理的重載方法。若 Button1的功能是:點(diǎn)擊后彈出一個(gè)用于輸入的界面,獲取用戶想要顯示的圖像文件名,則該界面最好是(從編程簡(jiǎn)單和程序不易出錯(cuò)的角度考慮) :( ) A、 模式( Modal) Dialog B、 非模式( Nonemodal) Dialog C、 FileDialog D、 Frame 答案: C 界面如上題所示。 } } A、 good and abc B、 good and gbc C、 test ok and abc D、 test ok and gbc 答案: B 運(yùn)行下列程序 , 會(huì)產(chǎn)生什么結(jié)果 ( ) public class X extends Thread implements Runable{ public void run(){ (this is run())。如果在 A 區(qū)域使用某種 AWT 組件( 的子類)來負(fù)責(zé)繪制圖像 ,則繪圖 的語句最好應(yīng)放在該組件的哪個(gè)方法中 (考慮到應(yīng)用程序和 Java 虛擬機(jī)的 AWT 線程都會(huì)要求重畫該組件 )?( ) A、 構(gòu)造方法 B、 paint( Graphics g) C、 update( Graphics g) D、 repaint() 答案: B 1 下面關(guān)于 Applet 的說法正確的是 ( ) A、 Applet 也需要 main 方法 B、 Applet 必須繼承自 C、 Applet 能訪問本地文件 D、 Applet 程序不需要編譯 答案: B 1 看 下面一段程序: class Aclass{ void go(){ (Aclass)。 class Inner{ void methodInner(){ (in the Inner)。 public Example(int a){ …… .. x = a。 } } // public class A{ int a=1。 c1 = 5。 s1=new student(張三 ,20,33)。 能寫為 s +=x[i]。 問題 : 1)若執(zhí)行前 ch1 的值為 ?a39。, , )。 ( +s1+ +s2,40,70)。 j。 } Java Application 的主類的定義,其功能是輸出所有命令行參數(shù)。 j 。 class ThreeTimeThread extends Thread{ public ThreeTimeThread(String str){ super(str)。 }catch (Exception e) {} String dateString = (currentTime)。 } } 答案: 1. Myclass, int j 2. a, i= 3. 0, args[i] 4. void, new 5. float, sum 編程題 : 編寫一個(gè)輸出 Hello World! 的程序,用兩種方式實(shí)現(xiàn)( Application、Applet)。 } } myprogram的定義 , 其中 A、 B 是該主類所在源程序中已定義的另兩個(gè)類的類名 : import java awt.*; import java applet.*; public class myprogram extends Applet//定義小程序的主類 { A a。 */ } } public static void ShowArray(int b[]) { for(int i=0。 public class Test56_Sort { public static void main(String args[ ]) { int[] a={42,99,5,63,95,36,2,69,200,96}。 } A( char c){ this( )。b39。 ) { if ( ch2 == ?b39。} } 問題: 1)類 B 是否能繼承類 A 的屬性 x? 2)若 b 是類 B 的對(duì)象,則 ()的返回值是什么? 3)若 b 是類 B 的對(duì)象,則 ()的返回值是什么? 4)類 A 和類 B 都定義了 x 屬性,這種現(xiàn)象稱為什么? 閱讀程序 (或程序片段 )并回答問題 。 ( b1 和 b2相或的結(jié)果是: + ( b1 | b2 ), 25, 45 )。 void show( ){ (Class A: +\ta=+ +\td=+)。 的長度是 5。 C、 當(dāng)創(chuàng)建一個(gè)新線程時(shí)。 } } 以上程序運(yùn)行結(jié)果是: ( ) A、 Aclass Aclass B、 Bclass Bclass C、 Aclass Bclass D、 Bclass Aclass 答案: C 1 下列關(guān)于 Java 線程的說法那些是正確的( ) A、 每一個(gè) Java 線程可以看成由代碼、一個(gè)真實(shí)的 CPU 以及數(shù)據(jù)三部份組成。 B、 FileInputStream in=new FileInputStream()。,39。 } A、 Test 1 B、 Test 2 C、 Test 3 D、 Test 4 答案: ACD
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1