Given the code fragment:
Examine the content of App.java:
Consider below code of Test.java file:
1. package com.sampleproject.oca;
2.
3. class Super {
4. public String num = "10"; //Line n1
5. }
6.
7. class Sub extends Super {
8. protected int num = 20; //Line n2
9. }
10.
11. public class Test {
12. public static void main(String[] args) {
13. Super obj = new Sub();
14. System.out.println(obj.num += 2); //Line n3
15. }
16. }
What will be the result of compiling and executing above code?
Which of the following is a checked Exception?
Given code of Thought.java file:
1. public class Thought {
2. /*INSERT*/ {
3. System.out.println("All is well");
4. }
5. }
Which 3 options, if used to replace /*INSERT*/, will compile successfully and on execution will print "All is well" on to the console?
Quickly grab our 1Z0-808 product now and kickstart your exam preparation today!
Name: | Java SE 8 Programmer I |
Exam Code: | 1Z0-808 |
Certification: | Oracle Certified Associate |
Vendor: | Oracle |
Total Questions: | 608 |
Last Updated: | Apr 25, 2024 |
© Copyright https://certsexpert.com 2015- 2024, All Rights Are Reserved.