Assess the CertsIQ’s updated 1Z0-808 exam questions for free online practice of your Java SE 8 Programmer I test. Our Java SE 1Z0 808 dumps questions will enhance your chances of passing the Oracle Certified Associate certification exam with higher marks.
Given code of Test.java file:
1. package com.sampleproject.oca;
2.
3. abstract class Animal {
4. abstract void jump() throws RuntimeException;
5. }
6.
7. class Deer extends Animal {
8. void jump() { //Line n1
9. System.out.println("DEER JUMPS");
10. }
11.
12. void jump(int i) {
13. System.out.println("DEER JUMPS TO " + i + " FEET");
14. }
15. }
16.
17. public class Test {
18. public static void main(String[] args) {
19. Animal animal = new Deer();
20. ((Deer)animal).jump(); //Line n2
21. ((Deer)animal).jump(5); //Line n3
22. }
23. }
What will be the result of compiling and executing Test class?
Given code:
package com.udayan.oca;
public class Test {
public static void main(String[] args) {
/*INSERT*/
arr[1] = 5;
arr[2] = 10;
System.out.println("[" + arr[1] + ", " + arr[2] + "]"); //Line n1
}
}
And below statements:
1. short arr [] = new short[2];
2. byte [] arr = new byte[10];
3. short [] arr; arr = new short[3];
4. short [2] arr;
5. short [3] arr;
6. int [] arr = new int[]{100, 100};
7. int [] arr = new int[]{0, 0, 0, 0};
8. short [] arr = {};
9. short [] arr = new short[2]{5, 10};
How many above statements can be used to replace /*INSERT*/, such that on execution, code will print [5, 10] on to the console?
Consider below code of Test.java file:
1. package com.sampleproject.oca;
2.
3. public class Test {
4. public static void main(String[] args) {
5. /*INSERT*/ x = 7, y = 200;
6. System.out.println(String.valueOf(x + y).length());
7. }
8. }
Which of the following options, if used to replace /*INSERT*/, will compile successfully and on execution will print 3 on to the console?
Select 3 options.
Consider below code:
1. //Test.java
2. package com.udayan.oca;
3.
4. import java.time.LocalDate;
5.
6. public class Test {
7. public static void main(String [] args) {
8. LocalDate joiningDate = LocalDate.parse("2006-03-16");
9. System.out.println(joiningDate.withDayOfYear(29));
10. }
11. }
What will be the result of compiling and executing Test class?
Given the code fragments:


© Copyrights CertsIQ 2025. All Rights Reserved
We use cookies to ensure that we give you the best experience on our website (CertsIQ). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the CertsIQ.