


版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、易宝支付JAVA开发工程师(L1 )招聘试题姓名:日期:_开始时间:完成时间:第一部分:JAVA知识写出下面代码的执行结果(分值io分)public class Foo publicstaticvoidmain( Stri ng args) Stri ng strValue="ABCDEFG"strValue.substri ng(3);strValue.c on cat("123");System. out .println("result="+ strValue);Stri ng value =new Stri ng ("
2、;ABCDEFG");System. out .println(strValue= value);写岀下面代码的执行结果public class Foo(分值 5分)public static voidmain( Stri ng args) int x = 100; int y = 200;if (x = y)System. out .println("Not equal");elseSystem. out .println("Equal");classExcepti on Test publicstaticvoidmain( Stri ng
3、args) try new Exceptio nTest().methodA(5); catch(lOException e) System. out .println(''caught lOExcepti on" catch(Excepti on e) System. out .println(''caught Excepti on"fin allySystem. out .println(''no Excepti on"写岀下面代码的执行结果(此题需写岀分析过程,没有分析过程不得分,分值10分)importjav
4、a.i o.IO Excepti on;publicvoidmethodA( int i)throwslOExcepti on ););if (i%2 != 0)throw new lOExceptio n("methodA lOExcepti on");写岀下面代码执行的结果(此题需写岀分析过程,没有分析过程不得分,分值10 分)四、public static"isTrue" );class Test boolea n isTrue() System. out .println( return true ;staticboolea n System.
5、returnisFalse() out .println( false ;"isFalse" );publicvoidifif五、publicstatic isTrue () | System.isFalseSystem.main( Stri ng args) ()"| operate retur n true"isFalse out .println()& isTrue out .println(写岀下面代码执行的结果class public);()"& operate return true"(此题需写岀分析过程,
6、没有分析过程不得分,分值ThreadTest static void MyThread t = t.run (); t.start(); System. out .println(mai n( Stri ng argv) new MyThread();"A"););10 分)classMyThreadexte ndsThreadpublic void run() try Thread.curre ntThread(). sleep (3000); catch (In terruptedExcepti on e) "B");System. out .pri
7、ntln(六、执行B.main的结果是什么?(此题需写出分析过程,没有分析过程不得分,分值10 分)class A void fun1() System.out.pri ntln(fun 2();in t fun 2() return 123;class B exte nds A int fun 2() return 456;public static void main( Stri ng argv) A a;B b = new B();b.fu n1();a = b;a.fu n1();七、执行ListTest.main的结果是什么?(此题需写出分析过程,没有分析过程不得分,分值10分)cl
8、ass Data intval;intgetVal() return val;voidsetVal(i nt val) this.val = val;public class ListTest public static void main( Stri ng argv) Data data = new Data(); ArrayList list = new ArrayList();for (int i=100; i<103; i+) data.setVal(i); list.add(data);int j = 0;while (j < list.size() Data tmp =
9、 (Data )list.get(j);System.out.pri ntl n("list(" + j + ") = " + tmp.getVal(); j+;八、请指岀以下代码有哪些错误(分值 15分)1.abstract class Name private String name;public abstract boolea n isStupidName(Stri ng n ame) 2.public class Somethi ng void doSometh ing () private Stri ng s =""int
10、l = s.len gth();3.public class Somethi ng public int add On e(fi nal int x) return +x;九、写岀以下正则表达式(分值 10分)1-6 位字母或数字:手机号(只能以139或159开头,11位数字):十、写一个方法,实现字符串的反转,如:输入abc,输出cba(分值10分)十一、写一个程序,计算1+22+32 +n2 (分值10分)public int count(int n)return n = 1 ? 1 : count(n-1) + n*n;十二、写一个延迟加载的单例模式(Singleton)的例子(分值10
11、分)第二部分:简答题十三、 列出JSP的内置对象,并描述其用途。(10分)十四、 列出web.xml中允许定义的元素,并描述其用途。(10分)十五、 列出JDBC操作数据库的步骤(10分)十六、 描述会话(session)和cookies的异同点(10分)十七、 有一个JSP代码如下,假设 WEB容器启动后有2个人分别用两台电脑轮流访问这个页面5次,那么最后一次访问这个页面的人看到的结果是什么?(需要写出分析过程,分值20分)v% page language="java" contentType="text/html; charset=GBK"%>
12、<%!int i = 0;%><%int j = 0;int s = 0;String str = (String)session.getAttribute("count"); if(str!=null)s = Integer.parselnt(str); s+;session.setAttribute("count", s+"");int a = 0;str = (String)application.getAttribute("count"); if(str!=null)a = Integer
13、.parselnt(str);a+;application.setAttribute("count", a+"");i+;j+;%>第三部分:数据库知识十八、数据库操作-学生表CREATE TABLE stude nt(ID CHAR (8) NOT NULL ,- 学生编号 NAME CHAR ( 8) NOT NULL ,- 姓名SEX CHAR ( 2),-性别AGE INT )-年龄-课程名称表CREATE TABLE COURSE (ID CHAR ( 4) NOT NULL ,- 课程编号 NAME CHAR ( 20) NOT NUL
14、L ,- 课程名称 DESCRIPTION CHAR( 50)-课程描述-课程和学生的关系表(多对多,一个学生可以上多个课程,一个课程允许多个 学生上)CREATE TABLE course2stude nt(ID_COURSE CHAR(4)NOT NULL ,-课程编号ID_)_STUDENT CHAR(8)NOT NULL -学生编号那么,1)在课程表中增加一个课程(课程编号: DB-1、课程名称:DB2-SQL-1 ),增加一个学 生(学生编号:20080001、姓名:张三),该学生上DB-1的课程。(5分)2) 更新课程中课程编号为“ DB-1 ”的课程名称为“ DB2-SQL ”、
15、课程描述为“ DB2 SQL 语法及其使用”。(5分)3) 查询课程名称以“ DB2 ”开头的课程有哪些?需要列岀课程编号、课程名称。(5分)4) 查询课程编号为“ DB-1 ”的有哪些学生 SQL的语句是什么?列岀学生编号、 姓名、性别。(5分)5)统计所有课程的学生人数,并按人数从低到高排列。只有列岀课程编号、上课 人数(5分)第四部分:逻辑题(选做)十九、 有12个一摸一样的小钢球,其中有一个的质量与其他的11个的质量不一样,现在有一架天平(无砝码)。请用这架天平从这12个小钢球中找岀与其他质量不一请证明最少要用几样的那一个小钢球,并判别岀这个小钢球是偏重还是偏轻。次?二十、 现在小明一
16、家过一座桥,过桥时候是黑夜,所以必须有灯。现在小明过桥要1秒, 小明的弟弟要3秒,小明的爸爸要6秒,小明的妈妈要8秒,小明的爷爷要12 秒。每次此桥最多可过两人,而过桥的速度依过桥最慢者而定,而且灯在点燃后3 0秒就会熄灭。问小明一家如何过桥?When you are old and grey and full of sleep,And nodding by the fire, take dow n this book,And slowly read, and dream of the soft lookYour eyes had on ce, and of their shadows dee
17、p;How many loved your mome nts of glad grace,And loved your beauty with love false or true,But one man loved the pilgrim soul in you,And loved the sorrows of your cha nging face;And bending dow n beside the glow ing bars,Murmur, a little sadly, how love fledAnd paced upon the mountains overheadAnd h
18、id his face amid a crowd of stars.The furthest dista nee in the worldIs not betwee n life and deathBut whe n I sta nd in front of youYet you don't know thatI love you.The furthest dista nee in the worldIs not whe n I sta nd in front of youYet you can't see my loveBut whe n un doubtedly knowing the love from bothYet cannot be together.The furthest dista nee in the worldIs not being
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年手卫生技巧与实践测试题及答案
- 2025年山东省招聘储备教师教育理论、教育基础知识+数学自测试题及答案
- 冬季三防工作方案
- 浙江省嘉兴市海盐县实验片联考2023-2024学年三年级上册期中考试科学试卷(含答案)
- Steam拼搭积木课件
- 浙江省杭州市萧山区高桥初级中学教育集团2024-2025学年七年级上学期语文12月月考试卷(含答案)
- SAC支架电液控客户培训课件
- rgp染色课件教学课件
- 贵阳市2026届高三年级摸底考试语文试卷(含答案)
- 七年级上数学试卷及答案
- 《就业必读》技工就业课程全套教学课件
- 闪闪发光的我心理健康教育
- 休闲运动组织与管理课件
- 肾移植超声检查临床应用
- 高氯酸浓度>72%(CAS号:7601-90-3)危险特性一览表
- 中望cad培训课件
- 港口物流管理专业教学标准(高等职业教育专科)2025修订
- 电子商务专业英语(附全套音频第3版)教案 张强华 - unit1-6
- 基于多源数据的态势融合-洞察及研究
- 中医馆公司财务管理制度
- 佛寺院内部管理制度
评论
0/150
提交评论