动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 认证考试 > Java认证
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Java认证 ]的信息

本月文章推荐
.SL-425 课程简介.
.热点解析:SCWCD认证面面观.
.课程介绍(4)SL-275 Java语言编程.
.SCJP备考指南.
.为Solaris认证之路画上圆满的句号.
.JAVA认证培训辅导:随机整数的生.
.Java程序员认证模拟题及详细分析.
.Java学习路径-方法篇+资源篇.
.浮躁-你不应是Java程序员的风格.
.构架Linux环境下Java开发环境(1).
.课程介绍(2)SL-210 向Java面向对.
.菜鸟第一招:给JAVA的初学者.
.Java认证权威问答精华集.
.SL-285 课程简介.
.有效和正确定义hashCode()和equa.
.SCJP认证套题解析之十一.
.热门问题:java.exe出错错误分析.
.课程介绍(7)SEM-SL-345 Java 2企.
.Sun Java 认证介绍.
.课程介绍(12)SL-330 Java开发数据.

Test of the Java Skill(3)

发表日期:2006-4-7 |


Question 17:
   What will happen when you attempt to compile and run this code?
   class Base{
   abstract public void myfunc();
   public void another(){
   System.out.println(“Another method”);
   }
   }

   public class Abs extends Base{
   public static void main(String argv[]){
   Abs a = new Abs();
   a.amethod();
   }
   public void myfunc(){
   System.out.println(“My func”);
   }
   public void amethod(){
   myfunc();
   }
   }

   A. The code will compile and run, printing out the words “My func”

   B. The compiler will complain that the Base class is not declared as abstract.

   C. The code will compile but complain at run time that the Base class has non abstract methods

   D. The compiler will complain that the method myfunc in the base class has no body

   Question 18:
   You need to create a class that will store some unique object elements. You do not need to sort these elements but they must be unique.

   What interface might be most suitable to meet this need?

   A. Set

   B. List

   C. Map

   D. Vector

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

   class Background implements Runnable{
   int i = 0;
   public int run(){
   while(true){
   i++;
   System.out.println(“i=” + i);
   }//End while
   }//End run
   }//End class

   A. It will compile and the run method will print out the increasing value of i

   B. It will compile and calling start will print out the increasing value of i

   C. The code will cause an error at compile time

   D. Compilation will cause an error because while cannot take a parameter of true

   Question 20:
   Given the following code how could you invoke the Base constructor that will print out the string “base constructor”?
   class Base{
   Base (int i){
   System.out.println(“base constructor”);
   }
   Base(){
   }
   }

   public class Sup extends Base{
   public static void main(String argv[]){
   Sup s = new Sup();
   // One
   }
   Sup(){
   // Tow
   }
   public void derived(){
   // Three
   }
   }

   A. On the line After // One put Base(10);

   B. On the line After // One put super(10);

   C. On the line After // Two put super(10);

   D. On the line After // Three put super(10);

   Question 21:
   Why might you define a method as native?
   A. To get to access hardware that Java does not know about

   B. To define a new data type such as an unsigned integer

   C. To write optimized code for performance in a language such as C/C++

   D. To overcome the limitation of the private scope of a method

   Question 22:
   What will happen when you attempt to compile and run the following code with the command line “hello there”?

   public class Arg{
   String[] MyArg;
   public static void main(String argv[]){
   MyArg = argv;
   }
   public void amethod(){
   System.out.println(argv[1]);
   }
   }

   A. Compile time error

   B. Compilation and output of “hello”

   C. Compilation and output of “there”

   D. None of the above

   Question 23:
   What will be printed out if this code is run with the following command line?
   java myprog good morning

   public class myporg{ 
   public static void main(String argv[]){
   System.out.println(argv[2]);
   }
   }

   A. myprog

   B. good

   C. morning

   D. Exception raised: “java.lang.ArrayIndexOutOfBoundsException: 2”

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

   public class Hope{
   public static void main(String argv[]){
   Hope h = new Hope();
   }

   protected Hope(){
   for (int i=0; i<10; i++){
   System.out.println(i);
   }
   }
   }

   A. Compilation error: Constructors cannot be declared protected

   B. Run time error: Constructors cannot be declared protected

   C. Compilation and running with output 0 to 10

   D. Compilation and running with output 0 to 9(CN-JAVA)

上一篇:菜鸟第一招:给JAVA的初学者 人气:2593
下一篇:SCJP认证套题解析之十一 人气:2982
浏览全部Java认证的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-9-6 Movie34电影搜索引擎 v3.0
2008-9-6 wap2.0仿帝国建站喜用 v2.0
2008-9-6 免费人才招聘网 宽屏版 v3.01
2008-9-6 喜喔喔视频采集程序 v1.0 beta
2008-9-6 ASP客户管理系统
2008-9-6 主流驿站中秋祝福程序
2008-9-6 php实现msn协议的类
2008-9-5 Coppermine Photo Gallery v1.4.
2008-9-5 清松网络日记本 v2.4
2008-8-23 Mini WinMount V0.4
2008-8-23 Vista优化大师3.11正式版
2008-8-23 Wine 1.13
2008-8-23 KlipFolio 5.0 Build 5899-80
2008-8-23 Windows Sysinternals Desktops
2008-8-23 OneTap Movies1.2破解版
2008-8-23 AnnotaterPDF阅读1.1.503 破解版
2008-8-23 SoundMeter分贝测量仪 v1.0汉化破
2008-8-23 iDrum音乐节拍1.0破解版
  发表评论
姓 名: 验证码:
内 容:
站长工具:网站收录查询 | Google PR查询 | ALEXA排名查询 | CSS在线编辑器 | 广告代码 | Html转换js | js/vbs加密 | md5加密 | 进制转换
实用工具:汉字翻译拼音 | 符号对照表 | 个税计算 | 经典小工具 | 汉字简繁转换 | 普通单位换算 | 公制单位换算 | 生辰老黄历 | 国内电话区号 国家代码与域名缩写 | 文字加密解密 | 健康查询 | 万年历 | 汉字横竖排版 | 手机号码查询 | 计算器 | ip搜索
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号