東華軟件筆試題_第1頁
東華軟件筆試題_第2頁
東華軟件筆試題_第3頁
東華軟件筆試題_第4頁
東華軟件筆試題_第5頁
全文預(yù)覽已結(jié)束

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、 北京東華合創(chuàng)數(shù)碼科技股份筆試試卷Java 語言部分: 聯(lián)系方式: 1. which wont cause a compiler warning or error?(多項(xiàng)選擇)a) float f = 1.3;b) char c = a;c) byte b = 257;d) boolean b = null;e) int i = 10;2. 請選擇下面這段代碼的輸出結(jié)果?int i = 0;switch (i) case 0:System.out.println("zero");case 1:System.out.println("one");case

2、2:System.out.println("two");break;case 3: System.out.println("three");1) zero2) zero,one3) zero,one,two4) zero,one,two,three3. public class Test private static int j=0; public static boolean methodB(int k) j+=k; return true; public static void methodA(int i) boolean b; b=i>10&

3、amp;methodB(1); b=i>10&&methodB(2); public static void main(String args) methodA(0); 17) what is the value of j at line 17? 10 21 32434. If we execute the code below with “java Test Red Green Blue”, what is the result? public class Test public static void main(String args) String foo=args

4、1; String bar=args2; String baz=args3; what is the value of baz? A. baz has value of "" B. baz has value of null C. baz has value of "Red" D. baz has value of "Blue" E. baz has value of "Green" F. the code does not compile G. the program throw an exception5. 請

5、選擇下面這段代碼的輸出結(jié)果?1)public class Test 2)public static void main(String args) 3) class Foo 4) public int i=3; 5) 6)Object o=(Object)new Foo(); 7) Foo foo=(Foo)o; 8)System.out.println(foo.i); 9) 10) A pile error at line 6 B pile error at line 7 C pile error at line 8 D.print out 36. int index=1; String te

6、st=new String3; String foo=testindex; what is the result of foo? A. "" B.null C.throw a Exception D.not compile7. 下面的五個(gè)選擇中哪兩個(gè)描述是正確的?多項(xiàng)選擇 A. static inner class requires a static initializer B. A static inner class requires an instance of the enclosing class C. A static inner class has no re

7、ference to an instance of the enclosing class D. A static inner class has accesss to the non-static member of the other class E. static members of a static inner class can be referenced using the class name of the static inner class8. 請選擇下面這段代碼的輸出結(jié)果? class A public int getNumber(int a) return a+1; c

8、lass B extends A public int getNumber(int a, char c) return a+2; public static void main(String args) B b=new B(); System.out.println(b.getNumber(0); A. compilation succeeds and 1 is printed B. compilation succeeds and 2 is printed C. An error at line 8 cause compilation to fail D. An error at line

9、14 cause compilation to fail9. class ExceptionTest public static void main(String args) try methodA(); catch(IOException e) System.out.println("caught IOException"); catch(Exception e) System.out.println("caught Exception"); If methodA() throws a IOException, what is the result?I

10、f we change the sequence of catch,whats the result?10. 請寫出下面這段代碼的輸出結(jié)果?public class Test public static void main(String args) StringBuffer a=new StringBuffer("A"); StringBuffer b=new StringBuffer("B"); operate(a,b); System.out.pintln(a+","+b); public static void operate(

11、StringBuffer x, StringBuffer y) x.append(y); y=x; 11. 請寫出下面這段代碼的輸出結(jié)果?class Shape Shape(int i) System.out.println("This is Shape" + i); public class Circle extends Shape static Shape s1 = new Shape(1); Shape s2 = new Shape(3); Circle(int i) super(i); System.out.println("This is Circle" + i); public static v

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論