【正文】
rror和exception有什么區(qū)別?31:Is Tomcat faster than serving static HTML pages than Apache d?第二篇:Java軟件開發(fā)工程師面試題寶典這套面試題主要目的是幫助那些還沒有java軟件開發(fā)實際工作經(jīng)驗,而正在努力尋找java軟件開發(fā)工作的朋友在筆試時更好地贏得筆試和面試。28: class Something { doSomething(){ String s = 。25:servlet的生命周期?26:Static Inner Class 和 Inner Class的不同,說得越多越好。.} .}: ()1 ()()99 time error ()簡答題22:怎樣在復(fù)雜的各種形式的網(wǎng)頁中提取mp3下載的結(jié)構(gòu)化數(shù)據(jù)?23:編寫一程序,利用RandomAccessFile類將一個文件的全部內(nèi)容追加到另一個文件的末尾。()。 static void main(String argv[]).{ b = new Derived()。.} ().{()。A.**0** B.**0****2** C.**0****1****2** 20:軟件生命周期的瀑布模型把軟件項目分為3個階段、8個子階段,以下哪一個是正常的開發(fā)順序?、開發(fā)階段、運行階段、開發(fā)階段、編碼階段、編碼階段、維護階段、編碼階段、測試階段21: will happen when you attempt to pile and run the following code? Base .{ i = 99。break。break。break。則執(zhí)行以下程序段的輸出結(jié)果為()。24.} : will be printed 11 code will not pile because the variable i cannot be declared twice within the main() code will not pile because the variable j cannot be declared twice within the switch of : this class outline: Example{ int x。19.} 20.} 21.} i = j。14.} : 16.{ j = 100。 : 11.{ j = 0。i++)7.{(digit)9.{ 39。(int i = 0。,0 ,1 ,0 ,1 16: will be the result of executing the following code? static void main(String args[])4.{ digit = 39。b)amp。d =(aamp。amp。c =(aamp。public class Test{// do something...} 15:以下的C程序代碼片段運行后C和d的值分別是多少Int a =1,b =2。class Person{// do something...} public class Test{// do something...} .*。package testpackage。12:A class design requires that a member variable should be accessible only by same package, which modifer word should be used? modifer 13: the following java source fragement: 2.//point x class Interesting{ 4.//do something 5.} statement is correctly Java syntax at point x? class MyClass{//do other thing…} int PI= MyClass{//do something…} 14:Which fragments are not correct in Java source file? testpackage。)myVect = new Vector()。11:。while(s)。}while(k=10000)。 k=1000。} (。10:在下述選項時,沒有構(gòu)成死循環(huán)的程序是 i=100 while(1){ i=i%100+1。 cctld!= null : “No country code data is available”。.} .} countryCode!= null。.// more code....} .// other methods.... String getCountry(String countryCode).{ .// What should be inserted here? country =(String)(countryCode)。(“uk”, “United Kingdom”)。 AssertTest().{ = new HashMap()。9: is the most appropriate code snippet that can be inserted at line 18 in the following code? .(Assume that the code is piled and run with assertions enabled) .*。9.} 10.} well be output: it for l is 3 it for l is 1 it for l is 2 it for l is 07: Which of the following statements are true? automatic garbage collection of the JVM prevents programs from ever running out of memory program can suggest that garbage collection be performed and force it collection is platform independent object bees eligible for garbage collection when all references denoting it are set to :下面關(guān)于變量及其范圍的陳述哪些是錯的。{(“Doing it for l is:”+l)。5:關(guān)于垃圾收集的哪些敘述是對的。 short_s=()。Which operation is not legal? i=()。(a)。=null。=new String(“game over”)。第一篇:java工程師面試題西安三元數(shù)碼軟件有限公司 外派JAVA軟件工程師筆試題4303返回上級目錄選擇題1:在軟件生命周期中,下列哪個說法是不準確的?、開發(fā)和運行三個階段2:public class Parent {int change(){…} }class Child extends Parent {}Which methods can be added into class Child? int change(){} int chang(){} int change(){} 3: the following method: void method(){ a,b。=new String(“hello world”)。(a+b+”ok”)。=b。10.} the absence of piler optimization, which is the earliest point the object a refered is definitely elibile to be garbage line 5 line 6 line 7 line 9 4: s=”Example String”。[3]=”x”。 t=”root”+s。6: the following code: class Example{ static void main(String args[]){ l=0。7.}while(l0)(“Finish”)。 class AssertTest .{ HashMap cctld。(“in”, “India”)。(“au”, “Australia”)。 country。 countryCode!= null : “Country code can not be null”。 cctld : “No country code data is available”。if(i100)break。)。do { ++k。 s=36。s。下面的哪些陳述為錯誤的? )public void create(){ )Vector myVect。)} 。public class Test{//do something...} .*。public class Test{// do something...} .*。import .*。Int c,d。b)amp。a。amp。a。a39。i 10。x39。(j)。(j)。(i)。4.//rest of class body… 5.} that x invoked by the code java Example, which statement can made x be directly accessible in main()method of ? private int x to public int x private int x to static int x private int x to protected int x private int x to final int x 18:Which are not Java keywords? 19:設(shè)有變量說明語句int a=1,b=0。switch(a){ case 1: switch(b){case 0:printf(“**0**”)。case 1:printf(“**1**”)。}case 2:printf(“**2**”)。}printf(“n”)。 void amethod().{(“()”)。.} .} class Derived extends Base .{ i =1。()。.} void amethod().{(“()”)。24:已知abc+cba=1333,其中a,b,c均為一位數(shù),編程求出滿足條件的a,b,c所有組合。27:如果有幾千個session,怎么提高效率。 l = ()。由于這套面試題涉及的范圍很泛,很廣,很雜,大家不可能一天兩天就看完和學(xué)完這套面試寶典,即使你已經(jīng)學(xué)過了有關(guān)的技術(shù),那么至少也需要一個月的時間才能消化和掌握這套面試寶典,所以,大家應(yīng)該早作準備,從拿到這套面試寶典之日起,就要堅持在每天閑暇之余學(xué)習(xí)其中幾道題目,日積月累,等到出去面試時,一切都水到渠成,面試時就自然會游刃有余了。要講你做出答案的思路過程,或者說你記住答案的思想都寫下來。答題就是給別人講道理、擺事實。你要大膽地指出對方題目很模糊和你的觀點,不要把面試官想得有多高,其實他和你就是差不多的,你想想,如果他把你招進去了,你們以后就是同事了,可不是差不多的嗎?關(guān)于就業(yè)薪水,如果你是應(yīng)屆生,那不能要高工資,好比大餅的故事,沒有文憑還想拿高工資,就去中關(guān)村缺什么補什么吧!少數(shù)人基礎(chǔ)確實很好,在校期間確實又做過一些項目,那仍然是可以要到相對高的工資的。一個“.java”源文件中是否可以包括多個類(不是內(nèi)部類)?有什么限制?可以有多個類,但只能有一個public的類,并且public的類名必須與文件名相一致。說說amp。amp。amp。amp。amp。還具有短路的功能,即如果第一個表達式為false,則不再計算第二個表達式,例如,對于if(str!= null amp。!(“”))表達式,當(dāng)str為null時,后面的表達式不會執(zhí)行,所以不會出現(xiàn)NullPointerException如果將amp。改為amp。If(x==33 amp。amp。還可以用作位運算符,當(dāng)amp。表示按位與操作,我們通常使用0x0f來與一個整數(shù)進行amp。 0x0f的結(jié)果為0x01。amp。的特殊之處,并列舉一些經(jīng)典的例子來表明自己理解透徹深入、實際經(jīng)驗豐富。例如,ok: for(int i=0。int arr[][] = {{1,2,3},{4,5,6,7},{9}}。for(int i=0。j} (“i=” + i + “,j=” + j)。break。j} if(j == 5)break ok。switch語句能否作用在byte上,能否作用在long上,能否作用在String上?在switch(expr1)中,expr1只能是一個整數(shù)表達式或者枚舉常量(更大字體),整數(shù)表達式可以是int基本類型或Integer包裝類型,由于,byte,short,char都可以隱含轉(zhuǎn)換為int,所以,這些類型以及這些類型的包裝類型也是可以的。short s1 = 1。有什么錯? short s1 = 1。有什么錯?對于short s1 = 1。由于s1+1運算時會自動提升表達式的類型,所以結(jié)果是int型,再賦值給short類型s1時,編譯器將報告需要強制轉(zhuǎn)換類型的錯誤。s1 += 1。char型變量中能不能存貯一個中文漢字?為什么?char型變量是用來存儲Unicode編碼的字符的,uni