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

    Given: Why will the code not compile?

    A. A static field cannot be private.
    B. The getLetter method has no body.
    C. There is no setLetter method.
    D. The letter field is uninitialized.
    E. It contains a method named Main instead of ma

  • Question 52:

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

    Which declaration initializes a boolean variable?

    A. boolean h = 1;
    B. boolean k = 0;
    C. boolean m = null;
    D. boolean j = (1 < 5);

  • Question 54:

    Given the code fragment:

    String h1 = "Bob";

    String h2 = new String ("Bob");

    What is the best way to test that the values of h1 and h2 are the same?

    A. if (h1 = = h2)
    B. if (h1.equals(h2))
    C. if (h1 = = h2)
    D. if (h1.same(h2))

  • Question 55:

    Given the code fragment:

    int b = 3;

    if ( !(b > 3)) {

    System.out.println("square ");

    }{

    System.out.println("circle ");

    }

    System.out.println("...");

    What is the result?

    A. square...
    B. circle...
    C. squarecircle...
    D. Compilation fails.

  • Question 56:

    Which three are valid types for switch?

    A. int
    B. float
    C. double
    D. integer
    E. String
    F. Float

  • Question 57:

    public class ForTest {

    public static void main(String[] args) {

    int[] arrar = {1,2,3};

    for ( foo ) {

    }

    }

    }

    Which three are valid replacements for foo so that the program will compiled and run?

    A. int i: array
    B. int i = 0; i < 1; i++
    C. ;;
    D. ; i < 1; i++
    E. ; i < 1;

  • Question 58:

    Given:

    What is the result?

    A. There is no output
    B. d is output
    C. A StringIndexOutOfBoundsException is thrown at runtime
    D. An ArrayIndexOutOfBoundsException is thrown at runtime
    E. A NullPointException is thrown at runtime
    F. A StringArrayIndexOutOfBoundsException is thrown at runtime

  • Question 59:

    Give:

    What value should replace kk in line x to cause jj = 5 to be output?

    A. -1
    B. 1
    C. 5
    D. 8
    E. 11

  • Question 60:

    Which code fragment cause a compilation error?

    A. flat flt = 100F;
    B. float flt = (float) 1_11.00;
    C. float flt = 100;
    D. double y1 = 203.22; floatflt = y1
    E. int y2 = 100; floatflt = (float) y2;

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.