当前位置:首页 > 全部子站 > IT > 思科认证

SCJP试题-SCJPMockExam2

来源:长理培训发布时间:2017-12-19 10:52:22

 百度广告

Question 1)
1) float f=1/3; 
3) float f=1.01; 

Answer to Question 1) 

Question 2)

1) NULL 
3) instanceOf 

Answer to Question 2) 

Question 3)

1) System.out.println(1+1); 
3) c

Answer to Question 3) 

Question 4)

1) The garbage collection algorithm in Java is vendor implemented 
3) The default type for a numerical literal with decimal component is a float. 

Answer to Question 4) 

Question 5)

1) I/O in Java can only be performed using the Listener classes 
3) The creation of a named instance of the File class creates a matching file in the underlying operating system only when the close method is called. 

Answer to Question 5) 

Question 6).

1) The instanceof operator can be used to determine if a reference is an instance of a class, but not an interface. 
3) The instanceof operator will only determine if a reference is an instance of a class immediately above in the hierarchy but no further up the inheritance chain 

Answer to Question 6) 

Question 7)

1) An interface can only contain method and not variables 
3) A class may extend only one other class and implement only one interface 

Answer to Question 7)

|||

Question 8)

1) public class MyCalc extends Math 
3) Math.round(9.99,1); 

Answer to Question 8) 

Question 9)

1) run 
3) yield 

Answer to Question 9) 

Question 10)

1) A byte can represent between -128 to 127 
3) A byte can represent between -256 to 256 

Answer to Question 10) 

Question 11)
class Base{ 
System.out.println("Base"); 

public static void main(String argv){ 

1) Compile time error Base is a keyword 
3) Output of Base 

Answer to Question 11) 

Question 12)

public static void main(String parm){ 
}

If you attempt to compile the class and run the program as follows

java myclass hello

What will happen?

1) Compile time error, main is not correctly defined 
3) Compilation and output of java 

Answer to Question 12) 

Question 13)

Which of the following statements are true?

1) If a class has any abstract methods it must be declared abstract itself. 
3) When applied to a class, the final modifier means it cannot be sub-classed 

Answer to Question 13)

|||

Question 14)
1) public static native void amethod(){} 
3) private protected void amethod(){} 

Answer to Question 14)

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

Question 15)

1) Constructors cannot have a visibility modifier 
3) Constructors can only have a primitive return type 
Answer to Question 15) 

Question 16)

class Base{
System.out.println("Base");
}

class Severn extends Base{
Severn s = new Severn();
void Severn(){
}

1) Compilation and output of the string "Severn" at runtime 
3) Compilation and no output at runtime 
Answer to Question 16) 

Question 17)
1) static methods do not have access to the implicit variable called this 
3) A static method may not be overriden to be non-static 

Answer to question 17) 

Question 18)
1)

char c='1'; 
>1);

2)

Integer i=Integer("1"); 
>1);

3)

int i=1; 
2) Performing an unsigned left shift (

责编:罗莉

发表评论(共0条评论)
请自觉遵守互联网相关政策法规,评论内容只代表网友观点,发表审核后显示!

国家电网校园招聘考试直播课程通关班

  • 讲师:刘萍萍 / 谢楠
  • 课时:160h
  • 价格 4580

特色双名师解密新课程高频考点,送国家电网教材讲义,助力一次通关

配套通关班送国网在线题库一套

课程专业名称
讲师
课时
查看课程

国家电网招聘考试录播视频课程

  • 讲师:崔莹莹 / 刘萍萍
  • 课时:180h
  • 价格 3580

特色解密新课程高频考点,免费学习,助力一次通关

配套全套国网视频课程免费学习

课程专业名称
讲师
课时
查看课程
在线题库
面授课程更多>>
图书商城更多>>
在线报名
  • 报考专业:
    *(必填)
  • 姓名:
    *(必填)
  • 手机号码:
    *(必填)
返回顶部