华为公司面试题.docx

上传人:大张伟 文档编号:11782294 上传时间:2021-09-08 格式:DOCX 页数:6 大小:71KB
返回 下载 相关 举报
华为公司面试题.docx_第1页
第1页 / 共6页
华为公司面试题.docx_第2页
第2页 / 共6页
华为公司面试题.docx_第3页
第3页 / 共6页
华为公司面试题.docx_第4页
第4页 / 共6页
华为公司面试题.docx_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《华为公司面试题.docx》由会员分享,可在线阅读,更多相关《华为公司面试题.docx(6页珍藏版)》请在三一文库上搜索。

1、华为公司java面试题第一部分:选择题QUESTION NO: 11、public class Test public static void changeStr(String str) str=welcome;public static void main(String口 args) String str=1234; changeStr(str);Please write the output result : welcomeQUESTION NO:21. public class Test 2. static boolean foo(char c) 3.4. return true;5.

2、6. public static void main( String口 argv ) 7. int i =0;8. for ( foo(A); foo(B)&(i2); foo(C)9. i+ ;10. foo(D);12 .13 .14 .What is the result? AA. ABDCBDCBB. ABCDABCDC. Compilation fails.D. An exception is thrown at runtime.QUESTION NO: 31. class A 2. protected int method1(int a, int b) return 0; 3. W

3、hich two are valid in a class that extends class A? (Choose two) bA. 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. static protected int method1(int a, int b)

4、 return 0; QUESTION NO: 4 d1. public class Outer2. public void someOuterMethod() 3. 5. public class Inner。6. public static void main( Stringargv ) 7. Outer o = new Outer();8. 10.Which instantiates an instance of Inner?A. new Inner(); new Inner(); 8 new (); new (); ew Inner()QUESTION NO: 5Which metho

5、d is used by a servlet to place its session ID in a URL th at is written to the servlet s response output stream? dA. The encodeURL method of the HttpServletRequest interface.B. The encodeURL method of the HttpServletResponse interface.C. The rewriteURL method of the HttpServletRequest interface.D.

6、The rewriteURL method of the HttpServletResponse interface.QUESTION NO: 6Which two are equivalent? (Choose two)A. B. C. D. E. F. G. QUESTION NO: 7Which of the following statements regarding the lifecycle of a sessio n bean are correct?1. is thrown if () is invoked when a stateful session bean instan

7、c e is passivated.2. () does not throw an exception when a session bean with bean-managed transaction demarcation is activated.3. An exception is not thrown when () is called in the afterBegin m ethod of a bean with container-managed transactions.4. JNDI access to java:comp/env is permitted in all t

8、he SessionSync hronization methods of a stateful session bean with container-managed transaction demarcation.5. Accessing resource managers in the method of a stateful session bean with bean-managed transaction does not throw an exception.第二部分:概念题1. 描述Struts体系结构?对应各个部分的开发工作主要包括哪些?2. XML包括哪些解释技术,区别是什

9、么?3. JSP有哪些内置对象和动作?它们的作用分别是什么?4、SQL问答题SELECT * FROM TABLE和SELECT * FROM TABLEWHERE 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_cardapplyg_applynovarchar8 ; /申请单号(关键字)字段(字段名/类型/长度):g_applynovarchar8 ; /申请单号(关键字)g_apply

10、datebigint8 ; /申请日期g_statevarchar2 ; /申请状态2、表名:g_cardapplydetail字段(字段名/类型/长度):g_namevarchar30; /申请人姓名g_idcardvarchar18 ; 申请人身份证号g_statevarchar2 ; /申请状态其中,两个表的关联字段为申请单号题目:1、查询身份证号码为0103082的申请日期3、将身份证号码为0103082的记录在两个表中的申请状态均改为07Select g_applydate from g_cardapply where g_idcarda=01030822、查询同一个身份证号码有两条以上记录的身份证号码及记录个数4、 删除g_cardapplydetail表中所有姓李的记录

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 科普知识


经营许可证编号:宁ICP备18001539号-1