JAVA认证课程JAVA认证课程Oracle-1z0-808.pdf

s@lm@n Oracle Exam 1z0-808 Java SE 8 Programmer I [ Total Questions: 236 ] Question No : 1 Given: What is the result? A. hEllOjAvA! B. Hello java! C. Out of limits hEllOjAvA! D. Out of limits Answer: C Question No : 2 Given the code fragment: Which code fragment, when inserted at line 3, enables the code to print 10:20? 2 A. int[] array n= new int[2]; B. int[] array; array = int[2]; C. int array = new int[2]; D. int array [2] ; Answer: A Question No : 3 Given: What is the result? A. 3 4 5 6 B. 3 4 3 6 C. 5 4 5 6 D. 3 6 4 6 Answer: C 3 Question No : 4 Given: What is result? A. Successful B. Unsuccessful C. Compilation fails D. An exception is thrown at runtime Answer: C Question No : 5 Given: class Sports { int num_players; String name, ground_condition; Sports(int np, String sname, String sground){ num_players = np; name = sname; 4 ground_condition = sground; } } class Cricket extends Sports { int num_umpires; int num_substitutes; Which code fragment can be inserted at line //insert code here to enable the code to compile? A. Cricket() { super(11, Cricket, Condidtion OK); num_umpires =3; num_substitutes=2; } B. Cricket() { super.ground_condition = Condition OK; =Cricket; super.num_players = 11; num_umpires =3; num_substitutes=2; } C. Cricket() { this(3,2); super(11, Cricket, Condidtion OK); } Cricket(int nu, ns) { this.num_umpires =nu; this.num_substitutes=ns; } D. Cricket() { this.num_umpires =3; this.num_substitutes=2; super(11, Cricket, Condidtion OK); } Answer: A Explanation: Incorrect: not C, not

文档评论(0)

1亿VIP精品文档

相关文档