java企業(yè)面試題

15 try{}里有一個(gè)return語(yǔ)句,那么緊跟try{}后面的finally{}語(yǔ)句是否執(zhí)行?
什么時(shí)候執(zhí)行,在return前還是return后 Java基礎(chǔ)——異常
16 位操作(OxEE&OxFF)>>4=? (-3)>>4=? (Oxff<<4)>>>4=? Java基礎(chǔ)
17 哪個(gè)方法可以結(jié)束線程的執(zhí)行 Java基礎(chǔ)
18 請(qǐng)寫(xiě)出對(duì)synchronized的理解 Java基礎(chǔ)
19 在撲克牌游戲中需要一個(gè)洗牌函數(shù),要求傳入一個(gè)有序內(nèi)容的數(shù)組參數(shù),傳出一個(gè)亂序內(nèi)容的數(shù)組,如何實(shí)現(xiàn) Java基礎(chǔ)
20 請(qǐng)勾畫(huà)一下Java SE平臺(tái)的體系結(jié)構(gòu),并分別說(shuō)明每層之間的關(guān)系和主要功能 Java基礎(chǔ)
21 請(qǐng)用Java語(yǔ)言編寫(xiě)和解決漢諾塔問(wèn)題 Java基礎(chǔ)
22 請(qǐng)描述final,finally,finalize的區(qū)別 Java基礎(chǔ)
23 String 是=new String("xyz");創(chuàng)建了幾個(gè)對(duì)象? Java基礎(chǔ)
24 public class test{
public static void change(String str){
str="old";
}
public static void main(String[] args){
String str="new";
change(str);
system.out.print(str)
}}
結(jié)果:1.old 2.new
請(qǐng)說(shuō)出代碼運(yùn)行結(jié)果,并說(shuō)明原因 Java基礎(chǔ)
25 下面結(jié)論正確的是
1、call by value 不會(huì)改變實(shí)際參數(shù)的數(shù)值
2、call by reference能改變實(shí)際參數(shù)的參考地址
3、call by reference不能改變實(shí)際參數(shù)的參考地址
4、call by reference能改變實(shí)際參數(shù)的內(nèi)容 Java基礎(chǔ)
26 檢查代碼的運(yùn)行結(jié)果
public class Test{
public void printString(final String str){
str=str+"!";
}
public static void mian(String ars{}){
Test t=new Test();
t.printString("hello world");
}
}
A.輸出“Hello world!”
B.執(zhí)行期間拋異常
C.編譯不通過(guò)
D.以上答案都不對(duì) Java基礎(chǔ)
北大青鳥(niǎo)網(wǎng)上報(bào)名
北大青鳥(niǎo)招生簡(jiǎn)章