吉聯新軟件股份有限公司JAVA筆試題_第1頁
吉聯新軟件股份有限公司JAVA筆試題_第2頁
吉聯新軟件股份有限公司JAVA筆試題_第3頁
吉聯新軟件股份有限公司JAVA筆試題_第4頁
免費預覽已結束,剩余1頁可下載查看

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、吉聯新軟件股份有限公司java筆試題 吉聯新軟件股份有限公司java筆試題吉聯新軟件股份有限公司java筆試題 (請將答案填寫在答題卡上) 時間:45分鐘 一、單項選擇題40分。(每題2分,共20題)1、下列哪個類是runtimeexception類的子類( )aarrayindexoutofboundsexception berrorcthrowable; dexception2、有內部類定義如下:public class outa public class innerb 則在其它類中,創建內部類innerb對象的語句是( )a.innerb ab=new innerb();b.outa.i

2、nnerb ab=new outa.innerb();c.outa.innerb ab=new outa().new innerb();d.innerb ab=new outa.innerb();3、在類中定義有兩個方法class myclassdouble addtwodata(int a,int b)return a+b;int addtwodata(int a,int b)return a+b;下列說法正確的是( )a.addtwodata()方法重載b.編譯錯誤c.addtwodata()方法改寫d.以上說法都不正確( )4、下列哪個類能為每個使用該變量的線程提供獨立的變量副本( )a

3、thread b threadfactory cthreadinfo dthreadlocal5、從字符串java中獲取子目v所在的位置(位置結果是2),你選擇用哪個方法 ( )aindexof(s,v); bcharat(2); cs.indexof(v); d mid(2,s);6、下列運算符合法的?(a )a& b:= cif d 7、b/s架構的b最確切的是指什么 ( )a和服務端一同提供配套的客戶端軟件 b基礎軟件環境c網頁瀏覽器 d firefox軟件8、rcp中都是使用下列哪項技術來擴展功能的,比如菜單、透視圖、編輯器等。( )a 插件 b擴展點 c工作臺 d工作區9、下列正確的

4、是:( b )ajava程序經編譯后會產生dllbjava程序經編譯后會產生byte codecjava程序經編譯后會產生machine coded以上都不正確10、 以下哪個不是collection的子接口?()list bsortedset cset dmap1、jsp中,不可以在多個頁面中一直保持數據的對象是 ( )arequest bcookie capplication dsession 2、下面語句請選擇正確的輸出( )system.out.println(4 | 3);a 1 b0 c 6 d73、編譯運行如下代碼,輸出是( )public class myprogpublic

5、static void main(string argv)system.out.println(argv2) ;anull b myprog c0dexception raised: java.lang.arrayindexoutofboundsexception: 24、編譯運行如下代碼,將會( )public class myclass public static void main(string argv) myclass h = new myclass (); protected myclass ()for(int i =0; i 10; i +) system.out.println

6、(i); a輸出0到10brun time error: constructors cannot be declared protectedccompilation error: constructors cannot be declared protectedd輸出0到95、下列哪個會告訴jvm執行垃圾回收 ( )asystem.free(); b system.out.gc();csystem.gc(); dsystem.setgarbagecollection();6、下列哪個類的聲明是正確的? ( )aabstract private move() b abstract final c

7、lass hicprotected private number; dpublic abstract class car7、閱讀以下代碼:import java.io.*;import java.util.*;public class foopublic static void main (string args)string s;system.out.println(s= + s);輸出結果應該是:( )a代碼得到編譯,并輸出s=b代碼得到編譯,并輸出s=nullc由于string s沒有初始化,代碼不能編譯通過d代碼得到編譯,但捕獲到 nullpointexception異常8、下列哪些不

8、是java技術的web服務器 ( )atomcat biis cgalssfish dweblogic9、在j2ee中,下列( a)語句可以獲取頁面請求中一個文本框的輸入(文本框的名稱為title).a. request.getparameter(“title”);b. request.getattribute(“title”);c. request.getparametervalues(“title”);d. request.getparameters(“title”);10、 總公司設有多個子公司,各子公司的系統的數據結構是統一的,且數據庫獨立運行;月底時,子公司將數據備份提交至總公司進行

9、匯總統計。下列的哪種hibernate主鍵生成機制適用于此種情形。( )a、assignedb、sequencec、uuid.hexd、increment二、多項選擇題40分(每題4分,共10題)1. 下面說法正確的是( )a、把只在類內部使用的屬性和方法聲明為privateb、使用私有內部類隱藏細節實現c、使用接口的屬性模擬常量枚舉,屬性名全部用大寫,如int maxsize=100d、包名統一使用小寫2. 以下是對表單提交方式中get方法以及post方法的一些闡述,正確的是( )aget方法中存在url長度的限制,而post方法沒有這個限制bget方法的字符集只能限制為ascii字符,而p

10、ost方法沒有這個限制c使用get方法時,url的參數個數是有上限的d使用post方法時,請求的url也可以是3. web程序中,下列哪些方法防止表單重復提交( )a令牌環 b驗證碼 cservlet djs控制提交銨鈕使能4. 下面哪個會有錯或異常的是( )afloat f=1.3; bchar c=a;cint i=10; dboolean b=null;5. 下列哪些是正確的 ( )astatic methods cannot be overriden to be non staticbstatic methods cannot be declared as privatecprivat

11、e methods cannot be overloadeddan overriden method cannot throw exceptions not checked in the base class6. 關于spring框架,下列說法正確的是 ( )a具備ioc特性 b具備aop特性c屬于重量級框架 d不能用于數據層7. 下列標識符不合法的有 ( )anew b$usdollars chello.w d12348. 執行完以下代碼int x = new int10;后,以下哪些說明是錯誤的( )ax9為0 bx9未定義 cx10為0 dx0為空.9. 為提高系統可維護性,通常會將系統

12、設計成多層架構,可包括下列哪些層( )a數據層 b代理層 c業務層 d視圖層10.sservlet中關于redirect與forward,下列說法正確的有( )aredirect客戶端會重新發出請求bforward客戶端會重新發出請求credirect,地址欄顯示之前的地址信息dforward,地址欄顯示之前的地址信息三、找錯題20分(共5處錯誤,每處4分)現需為網上書店提供一個接口,用于查詢某筆訂單對應的明細編號,書籍編號以及實際價格,并且按明細編號排序。表結構如下所示:字段描述字段名類型明細編號orderdetailidvarchar2(50)訂單號orderidvarchar2 (50)

13、書籍編號bookidvarchar2 (50)原價bookpricenumber (10,2)折扣率bookratenumber(4,2)備注memovarchar2 (4000)代碼如下:public map getorderdetail(string orderid ) string sql = select * from orderdetails ; sql += where orderid= + orderid ; sql += order by orderdetailid ; /注:getconnection為偽代碼,用于獲取數據庫連接 java.sql.statement st =

14、 getconnection().createstatement() ; resultset rs = st.executequery(sql) ; map a = new hashmap() ; orderdetail orderdetail = new orderdetail() ; while(rs.next() orderdetail.setorderdetailid(rs.getstring(1) ; orderdetail.setorderid(rs.getstring(2) ; orderdetail.setbookid(rs.getstring(3) ; orderdetail.setbookprice(r

溫馨提示

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

最新文檔

評論

0/150

提交評論