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

SCJP模拟试题[2](3)

 

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

 

 

       

4. if(A==4096)System.out.println("Equal");
5. else System.out.println("Not Equal");
6. }
7. }

a) The compiler objects to the loss of accurcy in the cast in line 3.
b) The program compiles and prints "Not Equal".
c) The program compiles and prints "Equal".

---------------------------------------------
Question 35:

What happens on trying to compile and run the following code?

1. public class EqualsTest{
2. public static void main(String args[]){
3. Long LA=new Long(7);
4. Long LB=new Long(7);
5. if(LA==LB) System.out.println("Equal");
6. else System.out.println("Not Equal");
7. }
8. }

a) The program compiles but throws a runtime exception in line 5.
b) The program compiles and prints "Not Equal";
c) The program compiles and prints "Equal".

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

Question 36: [Check all correct answers]

Given the following code for the Demo class:

public class Demo extends Base{
private int count;
public Demo(){
System.out.println("A Demo object has been created");
}
protected void addOne() {count++; }
}

Which of the following statements about the "count" variable is correct?

a) When a new Demo object is created, the value of count is zero.
b) When a new Demo object is created, the value of count is undefined.
c) An object of the Base class can have methods which modify the count variable.
d) The only way the count variable can be modified is by calling the addOne method.

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

Question 37: [Check all correct answers]

Which of the following statements will cause a compiler error.

a) float F=4096.0;
b) double D=4096.0;
c) byte B=4096;
d) char C=4096;

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

Question 38:

In the following method, which may be called with any kind of Object, we want to "short circuit" the logical test in line 2 if the object is not a Long. Which logical operator should replace the X in line 2 to accomplish this?

1. long Test(Object ob){
2. if(Ob instanceof Long X ((Long)Ob).longValue()>999){
3. return((Long)Ob).longValue();
4. }
5. return -1L;
6. }

a) Replace 'X' with '&&'.

 
b) Replace 'X' with ''.
c) Replace 'X' with '&'.
d) Replace 'X' with ''.

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

Question 39:

Which of the following statements is the correct form fro determining whether the float primitive X has the specail "Not a Number" value?

a) if(X instanceof Float.NaN)
b) if(X==Float.NaN)
c) if(Float.isNaN(X))

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

Question 40:

Which of the following are organizing principles of Java 's "javadoc" format documentation for a given class?

a) Relative frequency of use of the various methods.
b) Lists of methods in a class in alphabetic order.
c) Separate listing of private, protected and public methods in a calss.

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

Question 41:

The following program is compiled and then run with this command line:

java Demo alpha beta gamma

public class Demo{
public static void main(String args[]){
int n=3;
System.out.println("The word is "+args[n]);
}
}

What happens?

a) "The word is beta" is written to standard output.
b) "The word is gamma" is written to standard output.
c) The runtime system reports an ArrayIndexOutOfBoundsException in the main method.
d) The runtime system reports a NullPointerException in the main method.


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

Question 42:

What will be the result of running the following method with an input of 67?

public int MaskOff(int N){
return N^3;
}

a) The method will return 3.
b) The method will return 64.
c) The method will return 67.
d) The method will return 0.

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

Question 43:

What happens on trying to compile and run the following code?

public class EqualsTest{
public static void main(String args[]){
char A='u0005';
if(A==0x0005L) System.out.println("Equal");
else System.out.println("Not Equal");
}
}

a) The compiler reports "Invalid character in input" in line 3.
b) The program compiles and prints "Not Equal".
c) The program compiles and prints "Equal".

Q. 55

With which I/O operation can we append, update a file?

a) RandomAccessFile()

 

 

 

上下文章:

 

上一篇文章: SCJP模拟试题[2](2) 下一篇文章: SCJP Mock Exam 1(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 第九软件网 版权所有