面試題(移動通信方面)
1.方法重載與多態,簡述;2.什么是設計模式?使用過哪些?
3.列出熟悉的java開源項目及簡述;
4.一組radio,用alert彈出當前所選的是第幾個radio?用原生javascript;
5.function showme(){
Book.prototype.abc = function(){
alert('456');
}
var abook = new Book(1,2);
Book.abc = function(){
alert('123');
}
abook.abc();
Book.abc();
abc();//此方法調用瀏覽器會報錯,未定義
}
function Book(a,b){
this.a = a;
this.b = b;
Book.abc = function(){
alert('def');
}
this.abc = function(){
alert('xyz');
}
abc = function(){
alert('@@@@@@');
}
var abc = function(){
alert('$$$$$$');
}
}
點擊按鈕調用showme(),頁面顯示結果為:
第一個彈出框:xyz
第二個彈出框:123
6.線程的四種狀態?
7.ext有哪些組件?ext如何與后臺交互?
8.HashMap放入、查找、刪除,將所有value放入一個數組,得到map中所有內容;List添加、查找、刪除;
9.List<Student> student(name,age) 比較oldList<Student>和newList<student>,按名字比較,獲得新增的、修改的、刪除學生列表;
10.使用過哪些xml技術?怎么實現的?
11.java異常:throws、throw、try、catch、finally,舉例,如何處理異常
12.字符串反轉:
點擊按鈕調用showme(),頁面顯示結果為:
第一個彈出框:xyz
第二個彈出框:123
6.線程的四種狀態?
7.ext有哪些組件?ext如何與后臺交互?
8.HashMap放入、查找、刪除,將所有value放入一個數組,得到map中所有內容;List添加、查找、刪除;
9.List<Student> student(name,age) 比較oldList<Student>和newList<student>,按名字比較,獲得新增的、修改的、刪除學生列表;
10.使用過哪些xml技術?怎么實現的?
11.java異常:throws、throw、try、catch、finally,舉例,如何處理異常
12.字符串反轉:
public class TestKnowleage5 {
public static void main(String[] args){
System.out.println(reverse("abc"));
System.out.println(reverse2("abc"));
System.out.println(reverse3("abc"));
}
public static String reverse(String str){
return new StringBuffer(str).reverse().toString();
}
public static String reverse2(String str){
char[] chs = str.toCharArray();
char[] re = new char[chs.length];
for(int i = 0 ; i<chs.length;i++){
re[i] = chs[chs.length - i - 1];
}
return new String(re);
}
public static String reverse3(String str){
char[] chs = str.toCharArray();
String re = "";
for(int i = 0;i<chs.length;i++){
re += chs[chs.length - 1 -i];
}
return re;
}
}
Gavin
posted on 2012-04-10 22:39 GavinMiao 閱讀(533) 評論(0) 編輯 收藏 所屬分類: 面試題