没有合适的资源?快使用搜索试试~ 我知道了~
首页IKM在线测试 JAVA 88题带参考答案
IKM在线测试 JAVA 88题带参考答案
1星 需积分: 50 262 下载量 85 浏览量
更新于2023-03-16
评论 16
收藏 879KB PDF 举报
最新最全的IKM在线测试题库,增加如下内容: spring ioc hibernate multiple questions Concurrency/Threadpool Exceptions HQL Query interface, Criteria in Hibernate SimpleDateFormat
资源详情
资源评论
资源推荐
Updates from ADMjava04 batch:
spring ioc
hibernate multiple questions
Concurrency/Threadpool
Exceptions
More questions on hql
Query interface, Criteria in Hibernate
SimpleDateFormat
1) Which of the following techniques can a Java SE programmer use to increase the thread
safety of a program?
a. Use public static variables
b. Write classes so they are immutable
c. Use ThreadLocal variables
d. Use Final classes
e. Annotate a class with @Multithread
Ans: b,C
2) Under which of the following conditions will an alert message be displayed for the Java
script code given below
<form name=”frm”>
<label for=äge”> Please enter your birthday</label>
<input type =”text” name=äge” id=äge” onblur=”validate(this.value)”
<input type=”submit”id=Ënter”/></form>
<script language =”javascript”>
functionvalidate(val)
{
if (isNaN(val)
{
alert(“XXX XXX XXX”);
document.frm.age.focus();
}
}
</script>
a. If the text box age contains a numerical value and the submit button Submit is
clicked
b. If textbox age loses focus and contains a non-numerical value
c. If textbox age contains a non-numerical value and gains focus
d. If textbox age contains a non-numerical value and the submit button Enter is clicked
e. If textbox age loses focus and contains a numerical value
Ans: B
3) A Java EE servlet uses the line of code below:
String targetEmailForRequest = getServletConfig().getInitParameter(“corporateEmail”);
From which of the following locations will the application read the corporateEmail
value?
a. An attribute corporateEmailasteriin the request
b. A <servlet-mapping> element in web.xml
c. A corporateEmail entity in properties.xml
d. An <init-param> element in web.xml
e. A corporateEmail item in the session
Ans: d
4) Which of the following statements correctly describe lightweight and heavyweight Java
Swing components?
a. Lightweight components are faster in response and performance
b. JWindow, JFrame , JDialog and JApplet are lightweight components
c. Heavyweight components provide a consistent look and feel on all platforms
d. Heavyweight components depend on native code counterparts to handle their
functionality
e. AWT components are heavyweight, whereas Swing components are lightweight
Ans: a,d,e
5) Which of the following can be returned in the variable result from invoking the below
Java SE code
java.util.Random r = new java.util.Random();
int result = r.nextInt(7);
a. 3
b. -1
c. 1234567
d. 7
e. 0
Ans: a,e
6) Which of the following statements regarding the usage of the Java SE this() and super()
keywords are valid?
a. If used, this() or super() calls must always be the first statements in a constructor
b. this() and super() can be used in the same (non-constructor) method
c. If neither this() nor super() is coded then the compiler will generate a call to the zero
argument superclass constructor
d. this() and super() calls can be used in methods other than a constructor
e. this() and super() can be used in the same constructor
--------------------------
Ans: a,c
7) Which of the following statements are true about variable access between a Java SE
inner class and its containing class?
a. The inner class cannot access public variables in the containing class
b. The inner class cannot access its own private variables
c. The inner class can access private variables in the containing class
d. The containing class cannot access public variables in the inner class
e. The containing class can access private variables in the inner class
Ans: C,d
8) In Java EE environment, which of the following statements are valid concerning the
choice of a JDBC driver to access a database?
a. Type 2 drivers have been deprecated since J2SE 5.0 and so should not be chosen
b. Type 4 drivers exist for MySQL, Oracle, SQL Server and DB2
c. A type1 driver will perform slightly faster than type2 driver
d. A type3 driver does not support calls to stored procedures
剩余58页未读,继续阅读
weixin_41378799
- 粉丝: 4
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- RTL8188FU-Linux-v5.7.4.2-36687.20200602.tar(20765).gz
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论3