單項選擇題
A.123456 B.579 C.編譯錯誤 D.運(yùn)行時拋出異常
A.a=1; B.C=a+b; C.a+=2; D.shorta,b,C;
現(xiàn)有: 1. class Wrench f 2.public static void main(String [] args) { 3.Wrench w=new Wrench(); Wrench w2=new Wrench(); 4. w2=go (w, w2); 5.System.out.print (w2==w); 6. } 7.static Wrench go (Wrench wrl, Wrench wr2) { 8.Wrench wr3=wrl; wrl=wr2; wr2=wr3; 9. return wr3; 10. } 11. } 結(jié)果是什么?()
A.false B.true C.編譯失敗 D.運(yùn)行的時候有異常拋出
現(xiàn)有: 1.class Passer f 2.static final int X=5; 3.public static void main (String [] args) { 4.new Passer().go (x); 5.System. out .print (x); 6. ) 7.void go (int x) { 8.System. out .print(x++); 9.} 10.}結(jié)果是什么?()
A.55 B.56 C.65 D.66
現(xiàn)有如下五個聲明: Linel: int a_really_really_really_long_variable_name=5 Line2: int _hi=6; Line3: int big=Integer. getlnteger("7”); Line4:int $dollars=8; line5: int %opercent=9; 哪行無法通過編譯?()
A.Line1 B.Line3 C.Line4 D.Line5
A.goto B.sizeof C.instanceof D.volatile
A.userName B.2test C.$change D._password
A.\u03A6 B.077 C.OxABBC D.20
A.int B.String C.double D.boolean
多項選擇題
A.Java源文件的擴(kuò)展名應(yīng)為.java B.Java源文件的文件名應(yīng)與文件中的類名一致 C.Java字節(jié)碼文件的擴(kuò)展名應(yīng)為.java D.一個Java源文件中只能包含一個Java類
A.java類名參數(shù)1,參數(shù)2 B.javac類名參數(shù)1參數(shù)2 C.java類名參數(shù)1參數(shù)2 D.java類名參數(shù)1+參數(shù)2