1. <tbody id="y0n05"><nobr id="y0n05"><input id="y0n05"></input></nobr></tbody><strong id="y0n05"><acronym id="y0n05"></acronym></strong>

          1. 華為公司Java面試題

            小編:管理員 1012閱讀 2021.06.07

            第一部分:選擇題
            QUESTION NO: 1
            1、public class TestI
            public static void changeStr (String str) {
            str=" we lcome '
            }
            public static void main(String[] args) {
            String str='1234':
            changeStr (str) :
            }
            Please write the output result : we Icome


            QUESTION N0:2
            1. public class Test {
            2. static boolean foo (char c) {
            3.
            4. return true:
            5. }
            6. public static void main( String[] argv ) {
            7. int i =0:
            8. for ( foo('A'): foo('B')&&(i<2): foo('C')){
            9. i++ :
            10. foo('D'):
            12. }
            13. }
            14. }
            What is the result?? ?A
            A. ABDCBDCB
            B. ABCDABCD
            C. Compilation fails.
            D. An exception is thrown at runt ime.


            QUESTION NO: 3
            1. class A {
            2. protected int method1(int a. int b) { return 0: }
            3. }
            Which two are valid in a class that extends class A? (Choose two) b
            A public int method1(int a. int b) { return 0: }
            B. private int method1(int a. int b) { return 0: }
            C. private int method1(int a. long b) { return 0; ]
            D. public short method1(int a. int b) { return 0; }
            E. statio protected int method1(int a. int b) { return 0: }


            QUESTION NO: 4? ?d
            1. publio class Outer {
            2. publio void someOuterMethod0 {
            3. }
            5. public class Inner {}
            6. public static void main( String[]argv ) { .
            7. Outer o = new Outer0:
            8. }
            10. }
            Which instantiates an instance of Inner?
            A new Inner(): new Inner(): 8
            new (): new (): ew Inner ()


            QUESTION NO: 5
            Which method is used by a servlet to place its session ID in a URL th
            at is written to the servlet’ s response output str eam?? ? d
            A. The encodeURL method of the HttpServ letRequest interface.
            B. The encodeURL method of the HttpServI etResponse inter face.
            C. The rewr iteURL method of the HttpServletRequest inter face.
            D. The rewr iteURL method of the HttpServletResponse inter face.


            QUESTION NO: 6
            Which two are equivalent? (Choose two)
            A. <%= %
            B. <%= ()%>
            G. <%= ('size')%>
            D.
            E.
            F.
            G.

            QUESTION NO: 7
            Which of the following statements regarding the lifecycle of a session bean are correct?

            1.is thrown if 0 is invoked when a stateful session bean instanc .e is pass ivated.

            2.() does not throw an exception when a session bean with bean-managed transact ion demarcation is act ivated.

            3.An exception is not thrown when 0 is called in the afterBegin nethod of a bean with conta iner -managed tr ansact ions.

            4. JNDI access to java:comp/env is permitted in all the SessionSynchronization methods of a stateful session bean with conta iner managedtr. ansact ion demar cat ion.

            5.Accessing resource managers in the method of a stateful sess ionbean with bean managed tr ansaction does not throw an except ion.



            第二部分:概念題
            1. 描述Struts體系結構?對應各個部分的開發工作主要包括哪些?


            2. XML包括哪些解釋技術,區別是什么?


            3.JSP有哪些內置對象和動作?它們的作用分別是什么?


            4、SQL問答題
            SELECT * FROM TABLE



            SELECT * FROM TABLE

            WHERE NAME LIKE '%' AND ADDR LIKE '%'

            AND (1_ ADDR LIKE '%' OR 2_ _ADDR LIKE‘%'

            OR 3. _ADDR LIKE‘%%’ OR 4_ _ADDR LIKE '%' )

            的檢索結果為何不同?



            5、SQL問答題
            表結構:
            1、表名: g. cardapply

            字段(字段名/類型/長度) :

            g _applyno? ? varchar? ? 8; //申請單號(關鍵字)
            g_ applydate? bigint? ? ?8; //申請日期
            g_ state? ? ? var char? ?2; //申請狀態

            2、表名: g. cardapp lydetail
            字段(字段名/類型/長度) :
            g _applyno? ? varchar? ? 8; //申請單號(關鍵字)

            g_ name? ? ? ?varchar? ? 30; //申請人姓名?

            g_ idcard? ? ?var char? ?18; //申請人身份證號

            g_ state? ? ? var char? ?2; //申請狀態

            其中,兩個表的關聯字段為申請單號。.

            題目:
            1、查詢身份證號碼為0103082的申請日期??

            Select g_ applydate from g_ cardapply where g_ i dcarda=0103082

            2、查詢同一個身份證號碼有兩條以上記錄的身份證號碼及記錄個數

            3、將身份證號碼為0103082的記錄在兩個表中的申請狀態均改為07

            4、刪除g _cardapp lydetail表中所有姓李的記錄

            關聯標簽:
            国产欧美日韩激情视频一区,久久无码中文字幕无码网站,99久久久成人毛片无码,国产国语脏话对白免费视频,丰满熟女大屁股水多多