• 网络学院
  • 新手学堂
  • 操作系统
  • 网络技术
  • 软件应用
  • 办公软件
  • 编程技术
  • 网站架设
  • 数据库类
  • 平面设计
  • 多媒体类
  • 游戏资讯
  • 教学论文
  • 认证考试
SCJP
广告位
  站点:
  • 首 页
  • 最新软件
  • 最新文章
  • 国内软件
  • 国外软件
  • 汉化软件
  • 源码下载
  • 字体下载
SCJP Mock Exam 4(4)
软件发布 SCJP Mock Exam 4(4)
网络软件 系统工具 应用软件 联络聊天 图形图像 多媒体类 行业软件 游戏娱乐 编程开发 安全相关 教育教学 数码软件
热门软件: QQ 瑞星 pplive e话通 木马克星 千千静听 office2000 五笔字根 Photoshop 视频分割
返回首页 | 文章首页 | 认证考试 | JAVA认证 | JAVA题库 | SCJP Mock Exam 4(4)

SCJP Mock Exam 4(4)

 

添加时间: 2007-9-23 2:16:04  作者: JAVA题库  阅读次数:64   来源: http://www.d9soft.com

 

 

       

Answer to Question 24


--------------------------------------------------------------------------------

Question 25)

What will happen if you attempt to compile and run the following code?

Integer ten=new Integer(10);
Long nine=new Long (9);
System.out.println(ten + nine);
int i=1;
System.out.println(i + ten);
1) 19 followed by 20
2) 19 followed by 11
3) Error: Can't convert java lang Integer
4) 10 followed by 1

Answer to Question 25


--------------------------------------------------------------------------------

Question 26)

If you run the code below, what gets printed out?

String s=new String("Bicycle");
int iBegin=1;
char iEnd=3;
System.out.println(s.substring(iBegin,iEnd));
1) Bic
2) ic
3) icy
4) error: no method matching substring(int,char)

Answer to Question 26


--------------------------------------------------------------------------------

Question 27)
If you wanted to find out where the position of the letter v (ie return 2) in the string s
containing " Java ", which of the following could you use?

1) mid(2,s);
2) charAt(2);
3) s.indexOf('v');
4) indexOf(s,'v');

Answer to Question 27


--------------------------------------------------------------------------------

Question 28)
Given the following declarations

String s1=new String("Hello")
String s2=new String("there");
String s3=new String();
Which of the following are legal operations?

1) s3=s1 + s2;
2) s3=s1-s2;
3) s3=s1 & s2;
4) s3=s1 && s2

Answer to Question 28


--------------------------------------------------------------------------------

Question 29)
What is the result of the following operation?

System.out.println(4 3);

1) 6
2) 0
3) 1
4) 7

Answer to Question 29


--------------------------------------------------------------------------------

Question 30)
public class MyClass1 {
public static void main(String argv[]){ }
/*Modifier at XX */ class MyInner {}
}
What modifiers would be legal at XX in the above code?

1) public
2) private
3) static
4) friend

Answer to Question 30


--------------------------------------------------------------------------------

Question 31)

What will happen when you attempt to compile and run the following code?

public class Holt extends Thread{
private String sThreadName;
public static void main(String argv[]){
Holt h = new Holt();
h.go();
}
Holt(){}

Holt(String s){
sThreadName = s;
}
public String getThreadName(){
return sThreadName;
}

public void go(){
Holt first = new Holt("first");
first.start();
Holt second = new Holt("second");
second.start();
}

public void start(){
for(int i = 0; i < 2; i ++){
System.out.println(getThreadName() +i);
try{
Thread.sleep(100);
} catch(InterruptedException e){System.out.println(e.getMessage());}
}
}
}

 


1) Compile time error
2) Output of first0, second0, first0, second1
3) Output of first0, first1, second0, second1
4) Runtime error

Answer to Question 31


--------------------------------------------------------------------------------

Question 32)
An Applet has its Layout Manager set to the default of FlowLayout. What code would be correct to change to another Layout Manager.

1) setLayoutManager(new GridLayout());
2) setLayout(new GridLayout(2,2));
3) setGridLayout(2,2);
4) setBorderLayout();

Answer to Question 32


--------------------------------------------------------------------------------

Question 33)

What will happen when you attempt to compile and run the following code?.

1) It will compile and the run method will print out the increasing value of i.
2) It will compile and calling start will print out the increasing value of i.
3) The code will cause an error at compile time.

 

 

 

上下文章:

 

上一篇文章: SCJP Mock Exam 4(3) 下一篇文章: SCJP Mock Exam 4(5)

相关文章:

  • Sandy’socp1z0-001Exam
  • SCJP Mock Exam 2(2)
  • SCJP Mock Exam 2(1)
  • SCJP Mock Exam 1(8)
  • SCJP Mock Exam 1(7)

相关软件:

  • ExamXML V4.20
  • ExamDiff Pro V3.3 汉化版
  • ExamDiff V1.6m
  • ExamDiff Pro V3.4 beta 1223
  • Examine32 4.03 汉化版
  • Examine32 4.3

 

 

快速导航

  • 网络学院
  • 精品汇聚
  • 字体下载
  • 教程下载
  • ASP源码
  • PHP源码
  • Net源码
  • JSP 源码

JAVA认证分类导航

  • JAVA动态
  • JAVA指导
  • JAVA题库

本类经典文章推荐

  • SCJP模拟试题[2](2)
  • SCJP模拟试题[2](1)
  • SCJP考试真题和解析[1](2)
  • SCJP Mock Exam 3(1)
  • SCJP考试题310-025[5](1)
  • Java网络编程之URI、URL研究专题一
  • Java认证模拟题及分析(1)
  • SCJP模拟试题[1](3)
  • Java认证模拟题及分析(3)
  • SCJP考试真题和解析[2](3)

JAVA题库阅读排行

  • JAVA题库:考考你4
  • SCJP Mock Exam 2(2)
  • JAVA题库:考考你2
  • Java认证模拟题及分析(3)
  • Java认证模拟题及分析(1)
  • SCJP考试真题和解析[1](2)
  • JAVA题库:格林模拟试题一(上)(2)
  • SCJP模拟试题[2](3)
  • SCJP模拟试题[2](1)
  • SCJP考试真题和解析[1](1)

JAVA认证阅读总排行

  • JAVA题库:考考你4
  • SCJP Mock Exam 2(2)
  • JAVA题库:考考你2
  • Java认证模拟题及分析(3)
  • Java认证模拟题及分析(1)
  • SCJP考试真题和解析[1](2)
  • JAVA题库:格林模拟试题一(上)(2)
  • SCJP模拟试题[2](3)
  • SCJP模拟试题[2](1)
  • SCJP考试真题和解析[1](1)

广告位置

字母检索 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 回到顶部

关于我们 | 版权声明 | 免责条款 | 广告联系 | 软件发布 | 下载帮助 | 下载排行 | 网站地图 | 特别鸣谢 | 友情连接

copyright; 2005-2008 D9soft.com 第九软件网 版权所有