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 12, 2025

Oracle Oracle Certifications 1Z0-808 Questions & Answers

  • Question 221:

    Given the following main method:

    What is the result?

    A. 5 4 3 2 1 0

    B. 5 4 3 2 1

    C. 4 2 1

    D. 5

    E. Nothing is printed

  • Question 222:

    Given:

    What is the result?

    A. Null

    B. Compilation fails

    C. An exception is thrown at runtime

    D. 0

  • Question 223:

    What is the proper way to defined a method that take two int values and returns their sum as an int value?

    A. int sum(int first, int second) { first + second; }

    B. int sum(int first, second) { return first + second; }

    C. sum(int first, int second) { return first + second; }

    D. int sum(int first, int second) { return first + second; }

    E. void sum (int first, int second) { return first + second; }

  • Question 224:

    Given:

    public class SampleClass {

    public static void main(String[] args) {

    AnotherSampleClass asc = new AnotherSampleClass(); SampleClass sc = new SampleClass();

    sc = asc;

    System.out.println("sc: " + sc.getClass()); System.out.println("asc: " + asc.getClass());

    }}

    class AnotherSampleClass extends SampleClass {

    }

    What is the result?

    A. sc: class Object asc: class AnotherSampleClass

    B. sc: class SampleClass asc: class AnotherSampleClass

    C. sc: class AnotherSampleClass asc: class SampleClass

    D. sc: class AnotherSampleClass asc: class AnotherSampleClass

  • Question 225:

    Given the code fragment:

    What could expression1 and expression2 be, respectively, in order to produce output ?, 16?

    A. + +a, - -b

    B. + +a, b-

    C. A+ +, - - b

    D. A + +, b -

  • Question 226:

    Given the code fragment: What is the result?

    A. Sum is 600

    B. Compilation fails at line n1.

    C. Compilation fails at line n2.

    D. A ClassCastException is thrown at line n1.

    E. A ClassCastException is thrown at line n2.

  • Question 227:

    Given the code fragment:

    class Student {

    int rollnumber;

    String name;

    List cources = new ArrayList();

    // insert code here

    public String toString() {

    return rollnumber + " : " + name + " : " + cources;

    }

    }

    And,

    public class Test {

    public static void main(String[] args) {

    List cs = newArrayList();

    cs.add("Java");

    cs.add("C");

    Student s = new Student(123,"Fred", cs);

    System.out.println(s);

    }

    }

    Which code fragment, when inserted at line // insert code here, enables class Test to print 123 : Fred :

    [Java, C]?

    A. private Student(int i, String name, List cs) { /* initialization code goes here */ }

    B. public void Student(int i, String name, List cs) { /* initialization code goes here */ }

    C. Student(int i, String name, List cs) { /* initialization code goes here */ }

    D. Student(int i, String name, ArrayList cs) { /* initialization code goes here */ }

  • Question 228:

    Given the following four Java file definitions:

    // Foo.java

    package facades;

    public interface Foo { }

    // Boo.java

    package facades;

    public interface Boo extends Foo { }

    // Woofy.java

    package org.domain

    // line n1

    public class Woofy implements Boo, Foo { }

    // Test.java

    package.org;

    public class Test {

    public static void main(String[] args) {

    Foo obj=new Woofy();

    Which set modifications enable the code to compile and run?

    A. At line n1, Insert: import facades;At line n2, insert:import facades;import org.domain;

    B. At line n1, Insert: import facades.*;At line n2, insert:import facades;import org.*;

    C. At line n1, Insert: import facades.*;At line n2, insert:import facades.Boo;import org.*;

    D. At line n1, Insert: import facades.Foo, Boo;At line n2, insert:import org.domain.Woofy;

    E. At line n1, Insert: import facades.*;At line n2, insert:import facades;import org.domain.Woofy;

  • Question 229:

    Given:

    What is the result?

    A. 120

    B. 120D

    C. A NumberFormatException will be thrown.

    D. Compilation fails due to error at line 5.

    E. Compilation tails due to error at line 8.

  • Question 230:

    Given:

    What is the result?

    A. simaple A

    B. Capital A

    C. simaple A default Capital A

    D. simaple A default

    E. Compilation fails.

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.