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

SCJP模拟试题[1](3)

 

添加时间: 2007-9-23 1:58:11  作者: JAVA题库  阅读次数:96   来源: http://www.d9soft.com

 

 

       

class Test {
   public static void main(String[] args) {
      Thread t = new Thread(new RunHandler());
      t.start();
   }
}
Select all valid answers.

a) RunHandler must implement the java.lang.Runnable interface.

b) RunHandler must extend the Thread class.

c) RunHandler must provide a run() method declared as public and returning void.

d) RunHandler must provide an init() method.


----------------------------------
Question 27: To determine if you can invoke addContainerListener() for a component referenced using a variable named c, which expression(s) can you evaluate that will give you a true or false answer to this questions?
Select all valid answers.

a) c == Container

b) c.equals(Class.Container)

c) c instanceof Container

d) c instanceof Component

e) c implements Container

------------------------------------------
Question 28: Write a statement for a constructor that invokes the no-args, default constructor in its superclass.
 

Fill in the blank.


-------------------------------------------
Question 29: What is written to the standard output given the following statement:
System.out.println(4 & 7);
Select the one right answer.

a) 4

b) 5

c) 6

d) 7

e) 0


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

Question 30: What will the following block of code write to the standard output when it is executed?
int i = 3;
int j = 0;
double k = 3.2;
if (i < k)
   if (i == j)
      System.out.println(i);
   else
      System.out.println(j);
else
   System.out.println(k);
Select the one right answer.

a) 3

b) 0

c) 3.2

d) none of these

-----------------------------------------------
Question 31: How can you use the String method indexOf() to determine which position the letter 'C' is in given this String:

String s = "ABCDE";
Write a complete statement in your answer, but you do not have to assign the letter you retrieve to another variable.

 

Fill in the blank.


----------------------------------------------
Question 32: Given that the variable g references a valid Graphics object, what does the following statement do?
g.fillRect(2, 3, 10, 20);
Select all valid answers.


a) draw the outline of a rectangle in the current background color

b) draw the outline of a rectangle in the current foreground color

c) fill in a rectangle using the current background color

d) fill in a rectangle using the current foreground color

e) fill in a rectangle in black


-----------------------------------------------
Question 33: Describe the following applet.
import java.applet.Applet;
import java.awt.event.*;
import java.awt.*;
public class MyApplet extends Applet {
   Button b1, b2;
   public void init() {
      ActionListener a = new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
            if (evt.getSource() == b1) {
               b1.setEnabled(false);
               b2.setEnabled(true);
            } else {
               b1.setEnabled(true);
               b2.setEnabled(false);
            }
         }
      };
      b1 = new Button("1");
      b1.addActionListener(a);
      add(b1);
      b2 = new Button("2");
      b2.addActionListener(a);
      add(b2);
   }
}
Select all valid answers.

a) Nothing appears in the applet

b) One button appears in the applet but does nothing

c) Two buttons appear in the applet

d) When the user clicks a button, nothing happens

e) When the user clicks a button, it becomes disabled

f) When a user clicks a button, the other button becomes enabled

Fill in the blank.

----------------------------------------
Question 41: What is the final value of temp in this sequence?
long temp = (int)3.9;
temp %= 2;
a) 0

b) 1

c) 2

d) 3

e) 4

Select the one right answer.


-----------------------------------------
Question 42: Analyze this line of code:
if (5 & 7 > 0 && 5 2) System.out.println("true");
Select the one right answer.

a) this line of code will not compile

b) this code will compile but nothing will appear in the standard output

c) this code will compile and write the word "true" in the standard output


----------------------------------------------
Question 43: Create a List object that allows multiple selections and displays 5 rows at a time.
 

Start by writing:

List l =
in your answer.

 

Fill in the blank.
----------------------------------------------
Question 44: What will the user interface look like in an applet given the following init() method?
public void init() {
   setLayout(new BorderLayout());
   add("East", new Button("hello"));
}
Select the one right answer.

a) Nothing will appear in the applet

b) A button will appear in the applet set in the exact center

c) A button will appear on the left side of the applet

d) A button will appear on the right side of the applet

e) A button will fill the entire applet


----------------------------------------
Question 45: Choose all true statements about the paint() method defined in the Component class:
Select all valid answers.

a) it is protected

b) it takes an instance of class Graphics

c) it is static

d) it is invoked automatically whenever you minimize and then maximize a component, such as a window

e) there is also a version that takes an int

 

 

 

上下文章:

 

上一篇文章: SCJP模拟试题[1](2) 下一篇文章: Java认证模拟题及分析(1)

相关文章:

  • 史上最强的几道oracle面试题
  • 国外公司的Oracle DBA试题
  • 今年4月三级数据库笔试试题及答案
  • Oracle DBA 逻辑备份试题选
  • 国外某公司的Oracle DBA试题

相关软件:

  • PS模拟器 2.2
  • FC模拟器 V2.0
  • 机动车驾驶员理论考试模拟系统 V2007 全国通用版
  • 试题库管理系统 V5.1
  • PSP模拟器 V2.1
  • 秋风试题大题 V1.0

 

 

快速导航

  • 网络学院
  • 精品汇聚
  • 字体下载
  • 教程下载
  • 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 第九软件网 版权所有