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 91:

    Given the code fragment:

    What is the result?

    A. Valid
    B. Not valid
    C. Compilation fails
    D. An IllegalArgumentException is thrown at run time

  • Question 92:

    Given the code fragment:

    What values of x, y, z will produce the following result?

    1 2 3 4 1 2 3 4 1 2 3 4

    1 2 3 4

    A. X = 4, Y = 3, Z = 2
    B. X = 3, Y = 2, Z = 3
    C. X = 2, Y = 3, Z = 3
    D. X = 4, Y = 2, Z = 3
    E. X = 2, Y = 3, Z = 4

  • Question 93:

    Given:

    What is true about the class Wow?

    A. It compiles without error.
    B. It does not compile because an abstract class cannot have private methods.
    C. It does not compile because an abstract class cannot have instance variables.
    D. It does not compile because an abstract class must have at least one abstract method.
    E. It does not compile because an abstract class must have a constructor with no arguments.

  • Question 94:

    Given:

    package p1;

    public interface DoInterface {

    void method1(int n1); // line n1

    }

    package p3;

    import p1.DoInterface;

    public class DoClass implements DoInterface {

    public DoClass(int p1) { }

    public void method1(int p1) { } // line n2

    private void method2(int p1) { } // line n3

    }

    public class Test {

    public static void main(String[] args) {

    DoInterface doi= new DoClass(100); // line n4

    doi.method1(100);

    doi.method2(100);

    }

    }

    Which change will enable the code to compile?

    A. Adding the public modifier to the declaration of method1 at line n1
    B. Removing the public modifier from the definition of method1 at line n2
    C. Changing the private modifier on the declaration of method 2 public at line n3
    D. Changing the line n4 DoClass doi = new DoClass ( );

  • Question 95:

    Given the classes:

    *

    AssertionError

    *

    ArithmeticException

    *

    ArrayIndexOutofBoundsException

    *

    FileNotFoundException

    *

    IllegalArgumentException

    *

    IOError

    *

    IOException

    *

    NumberFormatException

    *

    SQLException

    Which option lists only those classes that belong to the unchecked exception category?

    A. AssertionError, ArrayIndexOutOfBoundsException, ArithmeticException
    B. AssertionError, IOError, IOException
    C. ArithmeticException, FileNotFoundException, NumberFormatException
    D. FileNotFoundException, IOException, SQLException
    E. ArrayIndexOutOfBoundException, IllegalArgumentException, FileNotFoundException

  • Question 96:

    Which two may precede the word `class' in a class declaration?

    A. local
    B. public
    C. static
    D. volatile E. synchronized

  • Question 97:

    Given the code fragment:

    int [][] array2d = new int[2][3];

    System.out.println("Loading the data.");

    for ( int x = 0; x < array2d.length; x++) {

    for ( int y = 0; y < array2d[0].length; y++) {

    System.out.println(" x = " + x);

    System.out.println(" y = " + y);

    // insert load statement here.

    }

    }

    System.out.println("Modify the data. ");

    for ( int x = 0; x < array2d.length; x++) {

    for ( int y = 0; y < array2d[0].length; y++) {

    System.out.println(" x = " + x);

    System.out.println(" y = " + y);

    // insert modify statement here.

    }

    }

    Which pair of load and modify statement should be inserted in the code?

    The load statement should set the array's x row and y column value to the sum of x and y

    The modify statement should modify the array's x row and y column value by multiplying it by 2

    A. Load statement: array2d(x, y) = x + y; Modify statement: array2d(x, y) = array2d(x, y) * 2
    B. Load statement: array2d[x y] = x + y; Modify statement: array2d[x y] = array2d[x y] * 2
    C. Load statement: array2d[x, y] = x + y; Modify statement: array2d[x, y] = array2d[x, y] * 2
    D. Load statement: array2d[x][y] = x + y; Modify statement: array2d[x][y] = array2d[x][y] * 2
    E. Load statement: array2d[[x][y]] = x + y; Modify statement: array2d[[x][y]] = array2d[[x][y]] * 2

  • Question 98:

    Which two actions will improve the encapsulation of a class?

    A. Changing the access modifier of a field from public to private
    B. Removing the public modifier from a class declaration
    C. Changing the return type of a method to void
    D. Returning a copy of the contents of an array or ArrayList instead of a direct reference

  • Question 99:

    Given the code fragment:

    Which code fragment, when inserted at // insert code here, enables the code to compile and and print a b c?

    A. List update (String[] strs)
    B. Static ArrayListupdate(String [] strs)
    C. Static List update (String [] strs)
    D. Static void update (String[] strs)
    E. ArrayList static update(String [] strs)

  • Question 100:

    Given:

    This class is poorly encapsulated. You need to change the circle class to compute and return the area instead.

    What three modifications are necessary to ensure that the class is being properly encapsulated?

    A. Change the access modifier of the setradius () method to private
    B. Change the getArea () method public double getArea () { return area; }
    C. When the radius is set in the Circle constructor and the setRadius () method, recomputed the area and store it into the area field
    D. Change the getRadius () method: public double getRadius () { area = Math.PI * radius * radius; return radius; }

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.