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

SCJP Mock Exam 1(6)

 

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

 

 

       

public void f() {
a = 0;
b = 0;
int[] c = { 0 };
g(b, c);
System.out.println(a + " " + b + " " + c[0] + " ");
}
public void g(int b, int[] c) {
a = 1;
b = 1;
c[0] = 1;
}
public static void main(String args[]) {
Qcb90 obj = new Qcb90();
obj.f();
}
}

1) 0 0 0
2) 0 0 1
3) 0 1 0
4) 1 0 0
5) 1 0 1

Q45
Which statements concerning the effect of the statement gfx.drawRect(5, 5, 10, 10) are true, given that gfx is a reference to a valid Graphics object?

1) The rectangle drawn will have a total width of 5 pixels.
2) The rectangle drawn will have a total height of 6 pixels.
3) The rectangle drawn will have a total width of 10 pixels.
4) The rectangle drawn will have a total height of 11 pixels.

Q46
Given the following code, which code fragments, when inserted at the indicated location, will succeed in making the program display a button spanning the whole window area?

import java.awt.*;
public class Q1e65 {
public static void main(String args[]) {
Window win = new Frame();
Button but = new Button("button");
// insert code fragment here
win.setSize(200, 200);
win.setVisible(true);
}
}

1) win.setLayout(new BorderLayout()); win.add(but);
2) win.setLayout(new GridLayout(1, 1)); win.add(but);
3) win.setLayout(new BorderLayout()); win.add(but, BorderLayout.CENTER);
4) win.add(but);
5) win.setLayout(new FlowLayout()); win.add(but);

Q47
Which method implementations will write the given string to a file named "file", using UTF8 encoding?

IMPLEMENTATION A:
public void write(String msg) throws IOException {
FileWriter fw = new FileWriter(new File("file"));
fw.write(msg);
fw.close();
}

IMPLEMENTATION B:
public void write(String msg) throws IOException {
OutputStreamWriter osw =
new OutputStreamWriter(new FileOutputStream("file"), "UTF8");
osw.write(msg);
osw.close();
}

IMPLEMENTATION C:
public void write(String msg) throws IOException {
FileWriter fw = new FileWriter(new File("file"));
fw.setEncoding("UTF8");
fw.write(msg);
fw.close();
}

IMPLEMENTATION D:
public void write(String msg) throws IOException {
FilterWriter fw = FilterWriter(new FileWriter("file"), "UTF8");
fw.write(msg);
fw.close();
}

IMPLEMENTATION E:
public void write(String msg) throws IOException {
OutputStreamWriter osw = new OutputStreamWriter(
new OutputStream(new File("file")), "UTF8"
);
osw.write(msg);
osw.close();
}

1) Implementation A.
2) Implementation B.
3) Implementation C.
4) Implementation D.
5) Implementation E.

Q48
Which are valid identifiers?

1) _class
2) $value$
3) zer@
4) ¥ngstr
5) 2muchuq

Q49
What will be the result of attempting to compile and run the following program?

public class Q28fd {
public static void main(String args[]) {
int counter = 0;
l1:
for (int i=10; i<0; i--) {
l2:
int j = 0;
while (j < 10) {
if (j > i) break l2;
if (i == j) {
counter++;
continue l1;
}
}
counter--;
}
System.out.println(counter);
}
}

1) The program will fail to compile.
2) The program will not terminate normally.
3) The program will write 10 to the standard output.
4) The program will write 0 to the standard output.
5) The program will write 9 to the standard output.

Q50
Given the following interface definition, which definitions are valid?

interface I {
void setValue(int val);
int getValue();
}

DEFINITION A:
(a) class A extends I {
int value;
void setValue(int val) { value = val; }
int getValue() { return value; }
}

DEFINITION B:
(b) interface B extends I {
void increment();
}

DEFINITION C:
(c) abstract class C implements I {
int getValue() { return 0; }
abstract void increment();

 

 

 

上下文章:

 

上一篇文章: SCJP Mock Exam 1(5) 下一篇文章: SCJP Mock Exam 1(7)

相关文章:

  • 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 第九软件网 版权所有