




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、關(guān)關(guān)聯(lián)聯(lián)教教學(xué)學(xué)章章/ /課課時時1.1.試試題題正正文文2.2.難難度度3.3.區(qū)區(qū)分分度度4.4.分分數(shù)數(shù)哪個命令可以編譯Java文件?易中3哪個命令可以運行Java文件?易中3.java文件編譯后,將生成什么文件?易中3一個Java類,運行時從哪個方法開始?易中3main方法的參數(shù)是什么類型?易中3Java語言中有指針么?易中3下面哪個標(biāo)識符不合法?易中5下面哪個類名不符合命名規(guī)范?易中5下面哪個不是關(guān)鍵字?易中5下列哪項不能直接寫到一個Java類中?易中3為了使一個名為MyClass的public類成功編譯,需要滿足一下哪個條件?易中3一下哪個關(guān)鍵字不能用于頂層類?易中3Java類聲明
2、中,哪項是可選的?易中5聲明Java類的關(guān)鍵字是哪個?易中5Java類體用哪個符號?易中5下面哪個標(biāo)識符是符合命名規(guī)范的Java類名?易中5可以使用哪個修飾符修飾類?易中5Java屬性聲明中,哪項是可選的?易中5Java類的屬性,不能用哪個修飾符?易中5Java類的屬性,聲明在什么地方?易中5下面哪個標(biāo)識符是符合命名規(guī)范的屬性名?易中5Java類聲明中,哪項是可選的?易中5下面哪個不是Java類方法的返回值類型?易中5方法體用哪個符號表示?易中5下面哪個標(biāo)識符是符合命名規(guī)范的方法名?易中5下面哪項的兩個方法,是一個類中的方法重載?易中5下面哪項不是方法重載的要求?易中5下面哪項是方法重載的作用
3、?易中5哪項是類A中正確的構(gòu)造方法聲明?易中5下面哪項不是構(gòu)造方法必須有的特性?易中5如何調(diào)用構(gòu)造方法?易中5構(gòu)造方法是否可以重載?易中5哪項是public class A中默認構(gòu)造方法的聲明?易中5public class A中幾個構(gòu)造方法?易中5public class Apublic A(int x)中幾個構(gòu)造方法?易中51.public class A 2.public A(int x)3.public static void main(String args) 4.A a new A();5.6.運行結(jié)果是什么?易中5對象用什么操作符調(diào)用屬性或方法?易中5Java類中如何創(chuàng)建對象?易
4、中5對象用什么操作符調(diào)用屬性或方法?易中5public class TestBlock private int x; System.out.println(實例塊); static System.out.println(靜態(tài)塊); public static void main(String args) new TestBlock(); new TestBlock(); 運行結(jié)果是?易中5public class TestBlock private int x; System.out.println(實例塊); static System.out.println(靜態(tài)塊); public st
5、atic void main(String args) 運行結(jié)果是?易中5對于內(nèi)部類,以下說法錯誤的是易中5對于以下代碼,請問插入哪個語句可以訪問到內(nèi)部類InsideOne?public class Example public static void main(String args) EnclosingOne eo=new EnclosingOne(); /插入語句處 class EnclosingOne public class InsideOne 易中5有關(guān)匿名內(nèi)部類的描述正確的是易中5以下哪些類型的變量可以被一個內(nèi)部類訪問?易中5以下關(guān)于內(nèi)部類的描述哪些是正確的?易中5以下哪些是Ja
6、va中的關(guān)鍵字?易中5聲明包使用哪個關(guān)鍵字?易中5下面哪個是符合命名規(guī)范的包名?易中5使用哪個關(guān)鍵字導(dǎo)入其他包?易中5哪個包可以不導(dǎo)入直接使用?易中5要使用com.chinasofti包下所有類,哪條語句正確? 易中5關(guān)于Java源代碼文件,下列說法錯誤的是?中中5對于以下說法,哪些是正確的?中中5類(外部類)可以使用哪個訪問權(quán)限修飾符?易中5方法可以使用哪個訪問權(quán)限修飾符?易中5屬性可以使用哪個訪問權(quán)限修飾符?易中5構(gòu)造方法可以使用哪個訪問權(quán)限修飾符?易中5只允許子類及同包類訪問某方法,使用哪個修飾符?易中5如果類中的成員變量只可以被同一包訪問,則使用如下哪個約束符?易中5為了實現(xiàn)對屬性的封
7、裝,屬性使用哪個訪問權(quán)限修飾符?易中5為了能夠訪問對封裝的屬性的訪問和修改,方法往往用哪個修飾符修飾?易中5以下哪個是有關(guān)封裝優(yōu)點的正確描述?易中5以下哪些是關(guān)于完全封裝的正確描述?易中5執(zhí)行下列語句后,變量i的值是:byte i = 127; byte(-27 27-1)i += 1; (當(dāng)溢出時回到最小)易中5執(zhí)行下列語句后,變量i的值是:byte i = 127;i = i+ 2;易中5char類型的取值范圍是?易中5以下哪個是10進制數(shù)123的正確的十六進制表示?易中5以下哪個是10進制數(shù)124的正確的八進制表示?易中5下面哪個賦值語句是合法的?易中5下面哪個類型是引用類型?易中5下面
8、哪個不是引用類型?易中5下面哪個說法正確?易中5Double和double分別是什么類型?易中50.3=0.3f的結(jié)果是?易中50.5和0.5f的以下說法正確的式?易中5Student s1=new Student(John);Student s2=new Student(Alice);s1=s2;System.out.println(s1.getName();輸出結(jié)果為?易中5public class TestChange /* * * param str */ public static void changeStr(String str) str=“;public static void
9、 main(String args) String str=welcome; changeStr(str); System.out.println(str);運行結(jié)果是?易中5public class TestEquals /* * param args */public static void main(String args) String a=a;String b=b;String c=a+b;String d=a+b;System.out.println(a=a);System.out.println(c=ab);System.out.println(d=c);System.out.p
10、rintln(new String(a)+b=c);運行結(jié)果是?易中5以下程序運行的結(jié)果是:public class Example public static void main(String args) System.out.println(String.replace(g,G) = String.replace(g,G); System.out.println(String.replace(t,t) = String.replace(t,t); 易中5public class TestReplace public static void stringReplace(Stringtext)
11、 text=text.replace(j, i);public static voidbufferReplace(StringBuffer text) text=text.append(C);public static void main(String args)String textString=new String(java);StringBuffer bufferString=newStringBuffer(java);stringReplace(textString);bufferReplace(bufferString);System.out.println(textString+b
12、ufferString);運行結(jié)果是?易中5下面哪個是包裝器類型?易中5Java語言中有多少個包裝器類型?易中5下列代碼在JDK1.5以上版本執(zhí)行的結(jié)果是?public class Example public static void main(String args) Integer i = 10; Integer j = 10; System.out.println(i = j); i = 210; j = 210; System.out.println(i = j); (超過-128127為false) 難中5數(shù)組是什么類型?易中5數(shù)組中可以存什么類型的數(shù)據(jù)?易中5下面哪條語句不正確?易
13、中5下面哪條語句不正確?易中5存在Employee類,如何創(chuàng)建一個長度為3的Employee類型數(shù)組?易中5以下那種初始化數(shù)組的方式是錯誤的?易中5以下哪些是聲明一個字符串?dāng)?shù)組的正確形式?易中5以下哪些語句正確?易中5以下哪些是初始化數(shù)組的正確形式?易中5執(zhí)行下列代碼后,哪個結(jié)論是正確的 String s=newString10;易中5數(shù)組索引從幾開始?易中5假設(shè)存在數(shù)組a,如何獲得a的長度?易中5假設(shè)存在int型數(shù)組a,哪項是正確的增強for循環(huán)迭代該數(shù)組?易中5以下給出代碼運行后的結(jié)果是?public class Example public static void main(String
14、 args) int refToArray = 10, 11 ; int var = 1; refToArrayvar - 1 = var = 2; System.out.println(refToArray0 + +refToArray1); 中中5以下代碼運行輸出的結(jié)果是什么?public class Example public static void main(String args) char c = new char100; System.out.println(c50); 中中5以下哪個語句用于獲取數(shù)組中的元素個數(shù)?中中5下列代碼的執(zhí)行結(jié)果是什么?public class Exa
15、mple public static void main(String args) int index = 1; int foo = new int3; int bar = fooindex; int baz = bar + index; System.out.println(baz); 中中5給出下面代碼:public class Examplestatic int arr = new int10;public static void main(String a)System.out.println(arr1);那個語句是正確的?中中5以下代碼執(zhí)行的結(jié)果是:public class Exam
16、ple public static void main(String args) int x = 1, 2, 3 ; x1 = (x1 1) ? x2 : 0; System.out.println(x1); 中中5下面哪個是正確的二維數(shù)組聲明?易中5下面哪個選項正確?易中5以下哪個語句實現(xiàn)了聲明一個二維整數(shù)數(shù)組?易中5以下代碼的執(zhí)行結(jié)果是?public class Example public static void main(String args) Element a1 = new Element1; Element a2 = new Element21; Element a3 = ne
17、w Element333; System.out.print(a3222); a10 = new Element(); a20 = a21 = a1; a30 = a31 = a32 = a2; System.out.print(a3222); class Element 易中5以下哪些是聲明一個數(shù)組的正確形式?易中5數(shù)組拷貝方法在哪個類中?易中5為將數(shù)組myArray的長度由3改為6,現(xiàn)采取以下代碼:int myArray = new int3;myArray = new int6;代碼執(zhí)行后,以下敘述哪項是正確的?易中5public class TestPass String str =
18、new String(hello);char ch = a,b,c;public static void main(String args) TestPass ex = new TestPass();ex.change(ex.str,ex.ch);System.out.print(ex.str + and );System.out.print(ex.ch);private void change(String str,char ch) str = test ok; ch1 = g;程序運行結(jié)果?易中5表達式(short)10/10.2*2運算后結(jié)果是什么類型?易中5一下代碼運行輸出結(jié)果是?pu
19、blic class Example public static void main(String args) System.out.println(3.0/0); 易中5下面的代碼段中,執(zhí)行之后i 和j 的值是什么?int i = 1;int j;j = i+;易中5以下代碼的執(zhí)行結(jié)果是:public class Example public static void main(String args) byte x = -64; byte y = -6; System.out.println(x / y + + x % y); 有int變量i的值為16384,133的結(jié)果為?易中5如果有in
20、t變量i和j,i的值為0 xFFFFFFF1,j=I,則j的值為?易中5以下給出代碼運行后的結(jié)果是?public class Example public static void main(String args) int x=1; int y=x+1; System.out.println(x+ +y); 易中5下列代碼執(zhí)行結(jié)果是?public class Example public static void main(String args) String str = 123; String str1 = new String(123); String str2 = 123; System
21、.out.println(str = str1); System.out.println(str = str2); 易中5給出以下代碼,假設(shè)arr數(shù)組中只包含正整數(shù)值,請問下列代碼段實現(xiàn)了什么功能?public int guessWhat(int arr) int x = 0; for (int i = 0; i arr.length; i+) x = x arri ? arri : x; return x; 易中5下列給出代碼的運行結(jié)果是?public class Example public static void main(String args) int m = 2; int p =
22、1; int i = 0; for (; p m) m = p + i; System.out.println(i equals + i); 易中5下面的表達式哪個是正確的?易中5以下哪些賦值表達式合法?(變量S為一個字符串)易中5以下代碼執(zhí)行后,x的值為public class Example public static void main(String args) int x = 0; boolean b1, b2, b3, b4; b1 = b2 = b3 = b4 = true; x = (b1 | b2 & b3 b4) ? x+ : -x; System.out.println(x
23、); 0中5現(xiàn)有3個變量boolean a,boolean b,int c,請問以下哪些表達式合法易中5如果有String s=null,以下代碼哪些選項會產(chǎn)生異常?易中5下列說法正確的是?易中.對于switch/case語句以下說法正確的有易中.下列說法正確的是?易中.以下代碼錯誤在何處?public class Example public static void main(String args) for(int i=0;j=0,i10;+i,j+=i) j+=i*i+j*j; 易中.類(外部類)可以使用哪個訪問權(quán)限修飾符?易中.以下哪個約束符可用于定義成員常量易中.給出如下代碼:cla
24、ss Testprivate int m;public static void fun() / some code.如何使成員變量m 被函數(shù)fun()直接訪問?易中.以下代碼的執(zhí)行結(jié)果是:public class Example static int i = 1, j = 2; static display(i); i = i + j; static void display(int n) System.out.println(n); public static void main(String args) display(i); 易中.以下代碼的執(zhí)行結(jié)果是:public class Exam
25、ple String s = Outer; public static void main(String args) S2 s2 = new S2(); s2.display(); class S1 String s = S1; void display() System.out.println(s); class S2 extends S1 String s = S2;易中5關(guān)于構(gòu)造器說法錯誤的是?易中0以下哪個針對默認無參構(gòu)造器描述是正確的?易中5當(dāng)一個類的所有構(gòu)造器均為私有的,以下哪個描述是正確的?易中5以下哪些修飾符可以用于構(gòu)造器?易中5下列給出的代碼段運行結(jié)果是?public cla
26、ss Example int maxElements; void Example() maxElements = 100; System.out.println(maxElements); public Example(int i) maxElements = i; System.out.println(maxElements); public static void main(String args) Example a=new Example(); Example b=new Example(999); 易中511) 已知如下代碼: 1: class Example2: String st
27、r;3: public Example()4: str= example;5: 6: public Example(String s)7: str=s;8: 9: 10: class Demo extends Example11: 12: public class Test13:public void f () 14:Example ex = new Example(Good);15:Demo d = new Demo(Good);16: 哪句語句會導(dǎo)致錯誤?易中5以下哪些關(guān)于構(gòu)造器的描述是正確的?易中5下列說法正確的是?易中5下列說法錯誤的是?易中5給出下面的代碼段:public class
28、 Baseint w, x, y ,z;public Base(int a,int b)x=a; y=b;public Base(int a, int b, int c, int d)/ assignment x=a, y=bw=d;z=c;在代碼說明/ assignment x=a, y=b處寫入如下哪幾個代碼是正確的?( )易中5下列說法錯誤的是?易中5在下面代碼中,在插入代碼處插入什么語句可以實現(xiàn)在A中的amethod()方法中直接調(diào)用類C的test()方法,而不需要創(chuàng)建一個類C的實例?class C public void test() System.out.println(C); c
29、lass B extends C public void test() System.out.println(B); class A extends B public void test() System.out.println(A); public void amethod() /插入代碼處 易中5關(guān)于重載和覆蓋,以下說法錯誤的是?易中5現(xiàn)有基類中的一個方法:void method(),請問以下哪些是子類中覆蓋該方法的正確形式?易中5現(xiàn)有如下代碼:class Super public float getNum() return 3.0f; class Sub extends Super /
30、空白處請問以下哪個語句放置在注釋的空白處會引起編譯錯誤?易中5以下關(guān)于方法覆蓋描述正確的有()易中5現(xiàn)有一下代碼:protected void method(intx).,以下哪些有關(guān)覆蓋該方法的描述是正確的?易中5以下代碼的執(zhí)行結(jié)果是什么?public class Example int i = 100; public void print() System.out.println(50); public static void main(String args) Example a = new A(); System.out.println(a.i); a.print(); class A
31、 extends Example int i = 200; public void print() System.out.println(300); 易中5現(xiàn)有以下代碼:class Base class Sub extends Base public String getFields() String name = Sub; return name; class DoSub public static void main(String args) Base b = new Sub(); / 插入語句處 在插入語句處插入那條代碼能夠輸出Sub?易中5當(dāng)線程在IO處堵塞時,以下哪些描述正確?易中5
32、以下哪些描述是正確的?易中5線程的默認優(yōu)先級是哪項?易中5以下代碼的執(zhí)行結(jié)果是什么?public class Example public static void main(String args) Base b = new Base(); Subclass1 S1 = new Subclass1(); Subclass2 s2 = new Subclass2(); s1 = (Subclass1) s2; class Base class Subclass1 extends Base class Subclass2 extends Base 易中5請問以下哪個描述是正確的?易中5請問wait
33、()方法定義在以下哪個類上?易中5請問wait()方法在以下哪個代碼中被調(diào)用?易中5請問以下哪些描述是正確的?易中5以下那些是線程停止執(zhí)行的原因?易中5以下哪些方法可以用于將一個正在執(zhí)行的線程停止執(zhí)行?易中5當(dāng)一個處于阻塞狀態(tài)的線程解除阻塞后,它將回到那個狀態(tài)?易中5請問以下哪些是有關(guān)線程狀態(tài)轉(zhuǎn)換的正確描述?易中5以下關(guān)于abstract的說法,正確的是?易中5下列說法錯誤的是?易中5定義在Object類上的hashCode()方法的返回值類型是什么?易中5關(guān)于集合中對象的equals()和hashCode()規(guī)定說法錯誤的是?易中5以下代碼執(zhí)行結(jié)果是什么?class Person stati
34、c void sayHello() System.out.println(HelloWorld!); public class Example public static void main(String args) (Person) null).sayHello(); 易中5以下代碼的執(zhí)行結(jié)果是?class RectObject public int x; public int y; public RectObject(int x, int y) this.x = x; this.y = y; Override public boolean equals(Object obj) if (th
35、is = obj) return true; if (obj = null) return false; if (getClass() != obj.getClass() return false; final RectObject other = (RectObject) obj; if (x != other.x) return false; if (y != other.y) return false; return true; public class Example public static void main(String args) HashSet set = newHashS
36、et(); RectObject r1 = new RectObject(3, 3); RectObject r2 = new RectObject(5, 5); RectObject r3 = new RectObject(3, 3); set.add(r1); set.add(r2); set.add(r3); set.add(r1); System.out.println(size: + set.size(); 易中5以下代碼執(zhí)行結(jié)果是?class RectObject public int x; public int y; public RectObject(int x, int y)
37、 this.x = x; this.y = y; Override public int hashCode() / TODO Auto-generated method stub return (int)System.nanoTime(); Override public boolean equals(Object obj) return false; public class Example public static void main(Stringargs) HashSet set = newHashSet(); RectObject r1 = new RectObject(3,3);
38、RectObject r2 = new RectObject(5,5); RectObject r3 = new RectObject(3,3); set.add(r1); set.add(r2); set.add(r3); set.add(r1); System.out.println(size: +set.size(); 給出下面代碼,請問該程序的運行結(jié)果是什么?interface A int x=0; A() x=5; A(int s) x=s; 易中5關(guān)于接口的說法,正確的是()易中5請選擇所有的正確答案。易中5以下哪些描述是正確的?易中5給出以下代碼,請問以下哪個描述是正確的?Pub
39、licXXXX extends something1,something2易中5關(guān)于類繼承的說法,正確的是()易中5Java語言中異常的分類是哪項?易中5所有異常的父類是哪項?易中5以下關(guān)于Error和Exception類的描述正確的是?易中5以下有關(guān)java.lang.Exception異常類的正確描述有?易中5對以下兩個代碼片段說法正確的是?代碼片段1: int a = 3; int b = 0; int c = a / b;代碼片段2:float a = 3.0f; /Infinity(無窮大)float b = 0.0f;float c = a / b;易中5下列代碼執(zhí)行后的結(jié)果是?p
40、ublic class Example public static void main(String args) try double x = 64.0; double y = 0.0; System.out.println(x % y); catch (Exception e) System.out.println(Exception); 易中5下列代碼執(zhí)行后的結(jié)果是?public class Example public static void main(String args) try double x = 64.0; double y = 0.0; System.out.println
41、(x % y = x % y); catch (Exception e) System.out.println(Exception); 易中5下列代碼執(zhí)行后的結(jié)果是?public class Example public static void main(String args) try System.out.println(Float.NaN =Float.NaN);System.out.println(Float.POSITIVE_INFINITY=Float.POSITIVE_INFINITY); catch (Exception e) System.out.println(Except
42、ion); 易中5下列屬于非受檢異常(運行時異常)的是哪項?易中5以下說法錯誤的是?易中5請問以下哪個程序代碼體現(xiàn)了對象之間的is a關(guān)系?易中5給出以下代碼,改程序的執(zhí)行結(jié)果是?interface Base int k = 0;public class Example implements Base public static void main(String args) int i; Example exm = new Example(); i = exm.k; i = Example.k; i = Base.k; System.out.println(i); 易中5現(xiàn)有以下代碼:inte
43、rface W class Z implements W class X extends Z class Y extends Z 下列哪些代碼段是正確的?中5Java語言中異常的分類是哪項?易中5現(xiàn)有代碼:public class Example public static void main(String args) try System.out.print(Integer.parseInt(forty); catch (RuntimeException e) System.out.println(Runtime); catch (NumberFormatException e) Syste
44、m.out.println(Number); 執(zhí)行結(jié)果是什么?易中5對以下兩個代碼片段說法正確的是?代碼片段1: int a = 3; int b = 0; int c = a / b;代碼片段2:float a = 3.0f;float b = 0.0f;float c = a / b;易中5下列代碼執(zhí)行后的結(jié)果是?public class Example public static void main(String args) try double x = 64.0; double y = 0.0; System.out.println(x % y); catch (Exception e
45、) System.out.println(Exception); 易中5現(xiàn)有如下代碼:public class Example extends Utils public static void main(String args) try System.out.println(newExample().getInt(42); catch (NumberFormatException e) System.out.println(NFExc); int getInt(String arg) throwsNumberFormatException return Integer.parseInt(arg
46、); class Utils int getInt(String arg) return 42; 該代碼執(zhí)行的結(jié)果是?易中5關(guān)于異常處理,說法錯誤的是?易中5關(guān)于以下代碼,說法正確的是?class Example public static void main(String args)throws IOException System.out.println(Before Try); try catch (Throwable e) System.out.println(Inside Catch); System.out.println(At the End); 易中5關(guān)于trycatchfin
47、ally結(jié)構(gòu),描述正確的是些?易中5當(dāng)fragile()方法拋出一個IllegalArgumentException異常時,下列代碼的運行結(jié)果是什么?public static void main(String args)throws IOException try fragile(); catch (NullPointerException e) System.out.println(NullPointerExceptionthrown); catch (Exception e) System.out.println(Exception thrown); finally System.out
48、.println(Done withexceptions); System.out.println(myMethod is done); 易中5現(xiàn)有如下代碼:public class Example public static void main(String args) try int x=Integer.parseInt(42a); /插入代碼處 System.out.println(oops); 在插入代碼處插入哪些語句可以在運行后輸出oops?易中5下列代碼的執(zhí)行結(jié)果是?class Example public static void main(String args)throws I
49、OException int i = 1, j = 1; try i+; j-; if (i = j) j+; catch (ArithmeticException e) System.out.println(0); catch (ArrayIndexOutOfBoundsException e) System.out.println(1); catch (Exception e) System.out.println(2); finally System.out.println(3); System.out.println(4); 易中5以下哪些是catch語句能夠捕獲處理的異常?易中5以下
50、哪些描述是正確的?易中5請問以下代碼的直接執(zhí)行結(jié)果是?class Example public static void main(String args) try System.out.println(args0); System.out.println(Im nomal); if (true) return; catch (Exception ex) System.out.println(Im exception); if (true) return; finally System.out.println(Im finally.); System.out.println(Out of try
51、.); 易中5下列代碼的運行結(jié)果是?class Example public static void main(String args)throws IOException try return; finally System.out.println(Finally); 易中5假設(shè)有自定義異常類ServiceException,那么拋出該異常的語句正確的是哪項?易中5在方法聲明中,說明該方法可能會拋出的異常列表時使用哪個關(guān)鍵字?易中5現(xiàn)有代碼如下:public class Example void topGo() try middleGo(); catch (Exception e) Syst
52、em.out.println(catch); void middleGo() throws Exception go(); System.out.println(late middle); void go() throws Exception throw new Exception(); public static void main(String args) Example example = new Example(); example.topGo(); 該代碼的執(zhí)行結(jié)果是?易中5如下代碼執(zhí)行后的輸出結(jié)果是?public class Example public static void m
53、ain(String args) try throw new Exception(); catch (Exception e) try throw new Exception(); catch (Exception e2) System.out.println(inner); System.out.println(middle); System.out.println(out); 易中5現(xiàn)有如下代碼:public class Example public static void main(String args) /a new Example().topGo(); void topGo() /
54、 b middleGo(); void middleGo() / c go(); System.out.println(late middle); void go() / d throw new Exception(); 為了使代碼能夠編譯通過,需要在哪個地方加入聲明throws Exception?易中5下面代碼的執(zhí)行結(jié)果是?class Example extends Utils public static void main(String args) try System.out.print(newExample().getlnt(42); catch (Exception e) Syst
55、em.out.println(Exc); int getlnt(String arg) throws Exception return Integer.parseInt(arg); class Utils int getlnt() return 42; 易中5請問以下哪些關(guān)于trycatchfinally結(jié)構(gòu)中的finally語句的描述是正確的?易中5關(guān)于以下代碼,說法正確的是?class Example public static void main(String args)throws IOException if (args0 = hello) throw new IOException
56、(); 易中5關(guān)于以下代碼,說法正確的是?class Example public static void main(String args)throws IOException System.out.println(Before Try); try catch (java.io.IOException e) System.out.println(Inside Catch); System.out.println(At the End); 易中5給出以下代碼:class Example public static void main(String args)throws IOException
57、 try methodA(); catch (IOException e) System.out.println(caught IOException); catch (Exception e) System.out.println(caught Exception); 如果methodA()方法拋出一個IOException異常,則該程序的運行結(jié)果是什么?易中5給出以下代碼,執(zhí)行結(jié)果是?class Example public static void main(String args)throws IOException aMethod(); static void aMethod() tr
58、y System.out.println(Try); return; catch (Exception e) System.out.println(Catch); finally System.out.println(Finally); 易中5以下代碼中,如果test()方法拋出一個NullPointException異常時,打印輸出什么內(nèi)容?class Example public static void main(String args)throws IOException try test(); System.out.println(Message1); catch (ArrayInde
59、xOutOfBoundsException e) System.out.println(Message2); finally System.out.println(Message3); 易中5以下代碼執(zhí)行結(jié)果是什么?class Example public static String output = ; public static void foo(int i) try if (i = 1) throw new Exception(); output += 1; catch (Exception e) output += 2; return; finally output += 3; out
60、put += 4; public static void main(String args)throws IOException foo(0); foo(1); System.out.println(output); 易中5以下代碼執(zhí)行結(jié)果是?public abstract class Example extendsBase public abstract void method();class Base public Base() throws IOException throw new IOException(); 易中5關(guān)于以下代碼正確的說法是:1.public class Exampl
溫馨提示
- 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)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 農(nóng)業(yè)設(shè)施確權(quán)管理制度
- 醫(yī)院食堂收費管理制度
- 工作目標(biāo)責(zé)任管理制度
- 軟件測試報告的寫作技巧試題及答案
- 醫(yī)院職工流動管理制度
- 揭秘2025年軟件測試考試中的重點難點試題及答案
- 員工意外保險管理制度
- 工程管理貨物管理制度
- 測試數(shù)據(jù)的生成與管理技巧試題及答案
- 2025-2030年中國緩釋和和控釋肥料行業(yè)市場現(xiàn)狀供需分析及投資評估規(guī)劃分析研究報告
- 衛(wèi)生法律法規(guī)的試題及答案
- 2025年廣東省廣州市越秀區(qū)中考物理一模試卷(含答案)
- 2025屆湖北省黃岡市黃州中學(xué)高考生物三模試卷含解析
- 砌磚理論考試題及答案
- 人格性格測試題及答案
- 2025-2030年中國電子變壓器市場運行前景及投資價值研究報告
- 2024年廣東省廣州市越秀區(qū)中考二模數(shù)學(xué)試題(含答案)
- 2025屆各地名校4月上旬高三語文聯(lián)考作文題目及范文12篇匯編
- 【9語一模】2025年4月天津市和平區(qū)九年級中考一模語文試卷(含答案)
- 骨科科室工作總結(jié)匯報
評論
0/150
提交評論