没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
s@lm@n
Oracle
Exam 1z0-808
Java SE 8 Programmer I
Version: 6.0
[ Total Questions: 236 ]
Given the code fragment:
What is the result?
A. 10 : 10
B. 5 : 5
C. 5 : 10
D. Compilation fails
Answer: A
Given:
Question No : 1
Question No : 2
Oracle 1z0-808 : Practice Test
2
What is the result?
A. box
B. nbo
C. bo
D. nb
E. An exception is thrown at runtime
Answer: E
Which three are advantages of the Java exception mechanism?
A. Improves the program structure because the error handling code is separated from the
normal program function
B. Provides a set of standard exceptions that covers all the possible errors
C. Improves the program structure because the programmer can choose where to handle
exceptions
D. Improves the program structure because exceptions must be handled in the method in
which they occurred
E. Allows the creation of new exceptions that are tailored to the particular program being
created
Answer: A,C,E
Given the code fragment:
Question No : 3
Question No : 4
Oracle 1z0-808 : Practice Test
3
What is the result?
A. Jesse 25
Walter 52
B. Compilation fails only at line n1
C. Compilation fails only at line n2
D. Compilation fails at both line n1 and line n2
Answer: D
Given:
class Mid {
public int findMid(int n1, int n2) {
return (n1 + n2) / 2;
}
Question No : 5
Oracle 1z0-808 : Practice Test
4
}
public class Calc extends Mid {
public static void main(String[] args) {
int n1 = 22, n2 = 2;
// insert code here
System.out.print(n3);
}
}
Which two code fragments, when inserted at // insert code here, enable the code to
compile and print 12?
A. Calc c = new Calc();
int n3 = c.findMid(n1,n2);
B. int n3 = super.findMid(n1,n3);
C. Calc c = new Mid();
int n3 = c.findMid(n1, n2);
D. Mid m1 = new Calc();
int n3 = m1.findMid(n1, n2);
E. int n3 = Calc.findMid(n1, n2);
Answer: A,D
Explanation:
Incorrect:
Not B: circular definition of n3.
Not C: Compilation error. line Calc c = new Mid();
required: Calc
found: Mid
Not E: Compilation error. line int n3 = Calc.findMid(n1, n2);
non-static method findMid(int,int) cannot be referenced from a static context
Given the code fragment:
Question No : 6
Oracle 1z0-808 : Practice Test
5
剩余196页未读,继续阅读
资源评论
dalian_cn
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功