Exam Details

  • Exam Code
    :1Z0-808
  • Exam Name
    :Java SE 8 Programmer I
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :385 Q&As
  • Last Updated
    :Apr 03, 2025

Oracle Oracle Certifications 1Z0-808 Questions & Answers

  • Question 191:

    int [] array = {1,2,3,4,5};

    for (int i: array) {

    if ( i < 2) {

    keyword1 ;

    }

    System.out.println(i);

    if ( i == 3) {

    keyword2 ;

    }}

    What should keyword1 and keyword2 be respectively, in oreder to produce output 2345?

    A. continue, break

    B. break, break

    C. break, continue

    D. continue, continue

  • Question 192:

    Given the code fragments: Which code fragment, when inserted at line ni, enables the code to print Hank?

    A. checkAge (iList, ( ) -> p. get Age ( ) > 40);

    B. checkAge(iList, Person p -> p.getAge( ) > 40);

    C. checkAge (iList, p -> p.getAge ( ) > 40);

    D. checkAge(iList, (Person p) -> { p.getAge() > 40; });

  • Question 193:

    Given: Which statement is true?

    A. Both p and s are accessible by obj.

    B. Only s is accessible by obj.

    C. Both r and s are accessible by obj.

    D. p, r, and s are accessible by obj.

  • Question 194:

    Given:

    public class TestLoop {

    public static void main(String[] args) {

    int array[] = {0, 1, 2, 3, 4};

    int key = 3;

    for (int pos = 0; pos < array.length; ++pos) {

    if (array[pos] == key) {

    break;

    }

    }

    System.out.print("Found " + key + "at " + pos);

    }

    }

    What is the result?

    A. Found 3 at 2

    B. Found 3 at 3

    C. Compilation fails

    D. An exception is thrown at runtime

  • Question 195:

    Given:

    What is the result?

    A. hEllOjAvA!

    B. Hello java!

    C. Out of limits hEllOjAvA!

    D. Out of limits

  • Question 196:

    Which two statements are true for a two-dimensional array of primitive data type?

    A. It cannot contain elements of different types.

    B. The length of each dimension must be the same.

    C. At the declaration time, the number of elements of the array in each dimension must be specified.

    D. All methods of the class object may be invoked on the two-dimensional array.

  • Question 197:

    Given:

    public class Natural {

    private int i;

    void disp() {

    while (i <= 5) {

    for (int i=1; i <=5;) {

    System.out.print(i + " ");

    i++;

    }

    i++;

    }

    }

    public static void main(String[] args) {

    new Natural().disp();

    }

    }

    What is the result?

    A. Prints 1 2 3 4 5 once

    B. Prints 1 3 5 once

    C. Prints 1 2 3 4 5 five times

    D. Prints 1 2 3 4 5 six times

    E. Compilation fails

  • Question 198:

    Given the code fragment

    int var1 = -5;

    int var2 = var1--;

    int var3 = 0;

    if (var2 < 0) {

    var3 = var2++;

    } else {

    var3 = --var2;

    }

    System.out.println(var3);

    What is the result?

    A. ?6

    B. ?4

    C. ?5

    D. 5

    E. 4

    F. Compilation fails

  • Question 199:

    Given:

    Which two code fragments are valid?

    A. Option A

    B. Option B

    C. Option C

    D. Option D

    E. Option E

  • Question 200:

    Given the following code for the classes MyException and Test: What is the result?

    A. A

    B. B

    C. Either A or B

    D. A B

    E. A compile time error occurs at line n1

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Oracle exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 1Z0-808 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.