1Z0-803 Exam Details

  • Exam Code
    :1Z0-803
  • Exam Name
    :Java SE 7 Programmer I
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :216 Q&As
  • Last Updated
    :Oct 18, 2021

Oracle 1Z0-803 Online Questions & Answers

  • Question 11:

    Given the code fragment:

    1.

    ArrayList list = new ArrayList<>(1);

    2.

    list.add(1001);

    3.

    list.add(1002);

    4.

    System.out.println(list.get(list.size()));

    What is the result?

    A. Compilation fails due to an error on line 1.
    B. An exception is thrown at run time due to error on line 3
    C. An exception is thrown at run time due to error on line 4
    D. 1002

  • Question 12:

    Given:

    What is the reference type of myZ and what is the type of the object it references?

    A. Reference type is Z; object type is Z.
    B. Reference type is Y; object type is Y.
    C. Reference type is Z; object type is Y.
    D. Reference type is X; object type is Z.

  • Question 13:

    Given:

    How many times is 2 printed as a part of the output?

    A. Zero
    B. Once
    C. Twice
    D. Thrice
    E. Compilation fails.

  • Question 14:

    Given:

    Which two declarations will compile?

    A. int a, b, c = 0;
    B. int a, b, c;
    C. int g, int h, int i = 0;
    D. int d, e, F;
    E. int k, l, m; = 0;

  • Question 15:

    Given the code fragment:

    System.out.println(2 + 4 * 9 - 3); //Line 21 System.out.println((2 + 4) * 9 - 3); // Line 22 System.out.println(2 + (4 * 9) - 3); // Line 23 System.out.println(2 + 4 * (9 - 3)); // Line 24 System.out.println((2 + 4 * 9) - 3); // Line 25

    Which line of codes prints the highest number?

    A. Line 21
    B. Line 22
    C. Line 23
    D. Line 24
    E. Line 25

  • Question 16:

    Given:

    public class Equal {

    public static void main(String[] args) {

    String str1 = "Java";

    String[] str2 = {"J","a","v","a"};

    String str3 = "";

    for (String str : str2) {

    str3 = str3+str;

    }

    boolean b1 = (str1 == str3);

    boolean b2 = (str1.equals(str3));

    System.out.print(b1+", "+b2);

    }

    What is the result?

    A. true, false
    B. false, true
    C. true, true
    D. false, false

  • Question 17:

    Given:

    public class Test {

    public static void main(String[] args) {

    try {

    String[] arr =new String[4];

    arr[1] = "Unix";

    arr[2] = "Linux";

    arr[3] = "Solarios";

    for (String var : arr) {

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

    }

    } catch(Exception e) {

    System.out.print (e.getClass());

    }

    }

    }

    What is the result?

    A. Unix Linux Solaris
    B. Null Unix Linux Solaris
    C. Class java.lang.Exception
    D. Class java.lang.NullPointerException

  • Question 18:

    Given:

    public class Test {

    public static void main(String[] args) {

    int day = 1;

    switch (day) {

    case "7": System.out.print("Uranus");

    case "6": System.out.print("Saturn");

    case "1": System.out.print("Mercury");

    case "2": System.out.print("Venus");

    case "3": System.out.print("Earth");

    case "4": System.out.print("Mars");

    case "5": System.out.print("Jupiter");

    }

    }

    }

    Which two modifications, made independently, enable the code to compile and run?

    A. Adding a break statement after each print statement
    B. Adding a default section within the switch code-block
    C. Changing the string literals in each case label to integer
    D. Changing the type of the variable day to String
    E. Arranging the case labels in ascending order

  • Question 19:

    Given the for loop construct:

    for ( expr1 ; expr2 ; expr3 ) {

    statement;

    }

    Which two statements are true?

    A. This is not the only valid for loop construct; there exits another form of for loop constructor.
    B. The expression expr1 is optional. it initializes the loop and is evaluated once, as the loop begin.
    C. When expr2 evaluates to false, the loop terminates. It is evaluated only after each iteration through the loop.
    D. The expression expr3 must be present. It is evaluated after each iteration through the loop.

  • Question 20:

    Which two statements are true?

    A. An abstract class can implement an interface.
    B. An abstract class can be extended by an interface.
    C. An interface CANNOT be extended by another interface.
    D. An interface can be extended by an abstract class.
    E. An abstract class can be extended by a concrete class.
    F. An abstract class CANNOT be extended by an abstract class.

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-803 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.