Oracle 1Z0-808 Exam (page: 8)
Oracle Java SE 8 Programmer I
Updated on: 01-Sep-2025

Viewing Page 8 of 49

Given:



What is the result?

  1. 97 98
    99 100 null null null
  2. 91 98
    99 100 101 102 103
  3. Compilation rails.
  4. A NullPointerException is thrown at runtime.
  5. An ArraylndexOutOfBoundsException is thrown at runtime.

Answer(s): A



Given the code fragment:


What is the result?

  1. 1:2:3:4:5:
  2. 1:2:3:
  3. Compilation fails.
  4. An ArrayoutofBoundsException is thrown at runtime.

Answer(s): A



Given:

public class Test1 {
static void doubling (Integer ref, int pv) {
ref =20;
pv = 20;
}
public static void main(String[] args) {
Integer iObj = new Integer(10);
int iVar = 10;
doubling(iObj++, iVar++);
System.out.println(iObj+ ", "+iVar);

What is the result?

  1. 11, 11
  2. 10, 10
  3. 21, 11
  4. 20, 20
  5. 11, 12

Answer(s): A

Explanation:

The code doubling(iObj++, iVar++); increases both variables from to 10 to 11.



Given:

public class FieldInit {
char c;
boolean b;
float f;
void printAll() {
System.out.println("c = " + c);
System.out.println("c = " + b);
System.out.println("c = " + f);
}
public static void main(String[] args) {
FieldInit f = new FieldInit(); f.printAll();
}
}

What is the result?

  1. c = null
    b = false
    f = 0.0F
  2. c = 0
    b = false
    f = 0.0f
  3. c = null
    b = true
    f = 0.0
  4. c =
    b = false
    f = 0.0

Answer(s): D



Given the code fragment:

  1. Option A
  2. Option B
  3. Option C
  4. Option D

Answer(s): D



Viewing Page 8 of 49



Share your comments for Oracle 1Z0-808 exam with other users:

Mchal 7/20/2023 3:38:00 AM

some questions are wrongly answered but its good nonetheless
POLAND


Merry 7/30/2023 6:57:00 AM

good questions
Anonymous