<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    自由飛翔

    我在仰望,java之上

    統計

    留言簿(2)

    我關注的blog

    閱讀排行榜

    評論排行榜

    易寶支付面試題(根據網上總結)

    1.public class TestKnowleage5 {
    public static void main(String[] args){
    String strValue = "ABCDEFG";
    strValue.substring(3);
    System.out.println("result1"+strValue);
    strValue.concat("123");
    System.out.println("result2"+strValue);
    String value = new String("ABCDEFG");
    System.out.println(strValue==value);
    }
    }

    運行結果:
    result1ABCDEFG
    result2ABCDEFG
    false
    2.public class Test{
        public static void main(String[] args){
             int x = 100;
    int y = 200;
    if(x == y)
    System.out.println("not equal");
    else
    System.out.println("equal");
        }
    }

    運行結果:
    equal

    3.public class TestKnowleage5 {
    public static void main(String[] args){
    try{
    new TestKnowleage5().methodA(5);
    }catch(IOException e){
    System.out.println("caught IOException");
    }catch(Exception e){
    System.out.println("caught Exception");
    }finally{
    System.out.println("no Exception");
    }
    }
    public void methodA(int i) throws IOException{
    if(i%2 != 0){
    throw new IOException("methodA IOException");
    }
    }
    }

    運行結果:
    caught IOException
    no Exception

    4.public class TestKnowleage5 {
    static boolean isTrue(){
    System.out.println("isTrue");
    return true;
    }
    static boolean isFalse(){
    System.out.println("isFalse");
    return false;
    }
    public static void main(String[] args){
    if(isTrue() || isFalse()){
    System.out.println("|| operate return true");
    }
    if(isFalse() & isTrue()){
    System.out.println("& operate return true");
    }
    }
    }

    運行結果:
    isTrue
    || operate return true
    isFalse
    isTrue

    5.public class TestKnowleage5{
    public static void main(String args[]){
    MyThread t = new MyThread();
    t.run();
    t.start();
    System.out.println("A");
    }
    }
    class MyThread extends Thread{
    public void run(){
    try{
    Thread.currentThread().sleep(3000);
    }catch(InterruptedException e){
    }
    System.out.println("B");
    }
    }
    運行結果:
    BBA或
    BAB
    6.class A{
    void fun1(){
    System.out.println(fun2());
    }
    int fun2(){
    return 123;
    }
    }
    public class TestKnowleage5  extends A{
    int fun2(){
    return 456;
    }
    public static void main(String[] args){
    A a;
    TestKnowleage5 b = new TestKnowleage5();
    b.fun1();
    a = b;
    a.fun1();
    }
    }

    運行結果:
    456
    456
    7.class A{
    int val;
    public int getVal() {
    return val;
    }
    public void setVal(int val) {
    this.val = val;
    }
    }
    public class TestKnowleage5{
    public static void main(String[] args){
    A data = new A();
    ArrayList list = new ArrayList();
    for(int i=100;i<103;i++){
    data.setVal(i);
    list.add(data);
    }
    int j = 0;
    while(j<list.size()){
    A tmp = (A)list.get(j);
    System.out.println("list("+j+")="+tmp.getVal());
    j++;
    }
    }
    }

    運行結果:
    list(0)=102
    list(1)=102
    list(2)=102

    8.hibernate導入大量數據時,為了避免內存中產生大量對象,在編碼時注意什么,如何去除?

    9.視圖與表的區別
    10.觸發器有哪幾種類型
    11.
    事務操作有那幾個步驟
    12.寫出對應正則表達式:
    1)1-6位字母或數字;
    [a-zA-Z0-9]{1,6}
    2)手機號(只能是139或159開頭,11位數字)
    1[35][9][0-9]{8}
    13.字符串反轉:new StringBuilder(str).reverse().toString();
    14.寫程序:1+2²+3²+...+n²
    int func(int n){
        return n==1?1:func(n-1)+n*n
    }

    15.寫一個延遲加載的單例模式:
    public class SingleTon{
        private static  SingleTon  instance = null;
        private SingleTon(){}
        public static SingleTon getInstance(){
            if(instance == null){
                    synchronized(""){
                        if(instance == null){return new SingleTon();}
                    }
            }
            return instance;
        }
    }

    16.
    JSP的9種內置對象:
    request:
    HttpServletRequest類的實例,
    客戶端的請求信息被封裝在request對象中
    response:
    HttpServletResponse類的實例,
    response對象包含了響應客戶請求的有關信息,但在JSP中很少直接用到它。
    out:
    out對象是JspWriter類的實例,是向客戶端輸出內容常用的對象
    session:
    session對象指的是客戶端與服務器的一次會話,從客戶端連到服務器的一個WebApplication開始,直到客戶端與服務器斷開連接為止。它是HttpSession類的實例
    page:
    page對象就是指向當前JSP頁面本身,有點象類中的this指針,它是java.lang.Object類的實例
    application:
    ServletContext類的實例,
    application對象實現了用戶間數據的共享,可存放全局變量。它開始于服務器的啟動,直到服務器的關閉
    exception:
    exception對象是一個例外對象,當一個頁面在運行過程中發生了例外,就產生這個對象。如果一個JSP頁面要應用此對象,就必須把isErrorPage設為true,否則無法編譯。他實際上是java.lang.Throwable的對象
    pageContext:
    pageContext對象提供了對JSP頁面內所有的對象及名字空間的訪問,也就是說他可以訪問到本頁所在的SESSION,也可以取本頁面所在的application的某一屬性值,他相當于頁面中所有功能的集大成者,它的本類名也叫pageContext
    config:
    config對象是在一個Servlet初始化時,JSP引擎向它傳遞信息用的,此信息包括Servlet初始化時所要用到的參數(通過屬性名和屬性值構成)以及服務器的有關信息(通過傳遞一個ServletContext對象)
    17.session和cookie的區別?
    18.JDBC的操作步驟?


    Gavin

    posted on 2012-04-11 11:32 GavinMiao 閱讀(1542) 評論(0)  編輯  收藏 所屬分類: 面試題

    主站蜘蛛池模板: 亚洲中文字幕在线观看| 国产精品成人无码免费| 精品国产亚洲一区二区三区 | 亚洲中文字幕日本无线码| 一区二区三区观看免费中文视频在线播放 | 亚洲国产综合人成综合网站| 无码天堂亚洲国产AV| 四虎永久免费观看| 免费人成网站永久| 伊人亚洲综合青草青草久热| 国产三级在线免费观看| 亚洲精品国产精品乱码在线观看 | 你懂的在线免费观看| 亚洲AV无码久久寂寞少妇| 日本中文字幕免费高清视频| 亚洲AV一宅男色影视| 永久免费在线观看视频| 亚洲国产高清视频在线观看| 成人免费在线视频| 一级看片免费视频| 久久狠狠高潮亚洲精品| 性感美女视频在线观看免费精品 | 亚洲国产精品18久久久久久| 亚洲AV无码乱码在线观看| 一个人免费观看视频在线中文| 亚洲成色www久久网站夜月| 四虎在线最新永久免费| MM1313亚洲国产精品| 国产亚洲精品拍拍拍拍拍| 日韩内射激情视频在线播放免费| 亚洲一级黄色大片| 亚洲?V无码成人精品区日韩| 美女视频黄的免费视频网页 | 五月亭亭免费高清在线| 亚洲成AV人片在WWW| 久久影视综合亚洲| 中文字幕乱码免费视频| 高潮毛片无遮挡高清免费视频| 亚洲AV无码专区国产乱码电影| 成人免费网站在线观看| 久久久久女教师免费一区|