1 / 7
文档名称:

郑州世纪创联java笔试题(附答案).docx

格式:docx   大小:30KB   页数:7
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

郑州世纪创联java笔试题(附答案).docx

上传人:mh900965 2017/11/19 文件大小:30 KB

下载得到文件列表

郑州世纪创联java笔试题(附答案).docx

相关文档

文档介绍

文档介绍:郑州世纪创联java笔试题(时间:50分钟)
姓名: 联系电话: 分数:
选择题(2*10分)
1. 下面哪些是Thread类的方法( )
A、run( ) B、start( ) C、notify() D、getPriority()
2. 下面程序运行结果是( )
public static void main(String[] args){
String str1="hello";
String str2="he"+new String("llo");
String str3=str1;
(str1==str2);
(str1==str3);
}
A、true true B、false false C、flase true D、true flase
3. 下列说法正确的有( )
A、 class中的constructor不可省略
B、 constructor必须与class同名,但方法不能与class同名
C、 constructor在一个对象被new时执行
D、一个class只能定义一个constructor
4. 下面程序运行结果是( )
public static void main(String[] args){
Thread t=new Thread (){
public void run (){
hello();
};
t. run ();
(“world”);
}
static void hello(){
(“hello”);
}
hello world B、word C、world hello D、都不输出
( )
A、Double B、Fload C、double D、fload
6. getCustomerInfo()方法如下,try中可以捕获三种类型的异常,如果在该方法运行中产生了一个IOException,将会输出什么结果( )
public void getCustomerInfo() {
try {
// do something that may cause an Exception
} catch ( ex) {
("FileNotFoundException!");
} catch ( ex) {
("IOException!");
} catch ( ex) {
("Exception!");
}
A 、IOException!
B、IOException!Exception!
C、FileNotFoundException!IOException!
D、FileNotFoundException!IOException!Exception!
7.  Java接口的修饰符可以为( )