1Z0-804 Exam Details

  • Exam Code
    :1Z0-804
  • Exam Name
    :Java SE 7 Programmer II
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :150 Q&As
  • Last Updated
    :Dec 08, 2021

Oracle 1Z0-804 Online Questions & Answers

  • Question 141:

    Given the two Java classes:

    public class Word {

    private Word(int length) {}

    protected Word(String w) {}

    }

    public class Buzzword extends Word {

    public Buzzword() {

    // Line ***, add code here

    }

    public Buzzword(String s) {

    super(s);

    }

    }

    Which two code snippets, added independently at line ***, can make the Buzzword class compile?

    A. this ();
    B. this (100);
    C. this ("Buzzword");
    D. super ();
    E. super (100);
    F. super ("Buzzword");

  • Question 142:

    Which two are valid initialization statements?

    A. Map m = new SortedMap();
    B. Collection m = new TreeMap();
    C. HashMap m = new SortedMap();
    D. SortedMap m = new TreeMap ();
    E. Hashtable m = new HashMap();
    F. Map m = new Hashtable();

  • Question 143:

    Given:

    Which two statements concerning the OO concepts "is-a" and "has-a" are true?

    A. Flimmer is-a Glommer.
    B. Flommer has-a String.
    C. Tagget has-a Glommer.
    D. Flimmer is-a ArrayList.
    E. Tagget has-a doStuff()
    F. Tagget is-a Glommer.

  • Question 144:

    Given:

    class Car implements TurboVehicle, Steerable {

    // Car methods > interface Convertible

    {

    // Convertible methods

    }

    public class SportsCar extends Car implements Convertible {

    }

    Which statement is true?

    A. SportsCar must implement methods from TurboVehicle and steerable
    B. SportsCar must override methods defined by car.
    C. SportsCar must implement methods define by convertible.
    D. Instances of car can invoke convertible methods.

  • Question 145:

    Given the code fragment:

    DataFormat df;

    Which statement defines a new Dateformat object that displays the default date format for the UK Locale?

    A. df = DateFormat.getdatDataInstance (DateFormat.DEFAULT, Locale (UK));
    B. df = DateFormat.getdatDataInstance (DateFormat.DEFAULT, UK);
    C. df = DateFormat.getdatDataInstance (DateFormat.DEFAULT, Locale.UK);
    D. df = new DateFormat.getdatDataInstance (DateFormat.DEFAULT, Locale.UK);
    E. df = new DateFormat.getdatDataInstance (DateFormat.DEFAULT, Locale (UK));

  • Question 146:

    Which three are true?

    A. A setAutoCommit (False) method invocation starts a transaction context.
    B. An instance of savepoint represents a point in the current transaction context.
    C. A rollback () method invocation rolls a transaction back to the last savepoint.
    D. A rollback () method invocation releases any database locks currently held by this connection object.
    E. After calling rollback (mysavepoint), you must close the savepoint object by calling mySavepoint.close() .

  • Question 147:

    Given:

    What is the result?

    A. fast slow
    B. fast goes
    C. goes goes
    D. fast fast
    E. fast followed by an exception
    F. Compilation fails

  • Question 148:

    Given:

    import java.util.concurrent.atomic.AtomicInteger;

    public class Incrementor {

    public static void main(String[] args) {

    AtomicInteger[] var = new AtomicInteger[5];

    for (int i = 0; i < 5; i++) {

    var[i] = new AtomicInteger();

    }

    for (int i =0; i < var.length; i++) {

    var[i].incrementAndGet();

    if (i ==2)

    var[i].compareAndSet(2,4);

    System.out.print(var[i] + " ");

    }

    }

    }

    What is the result?

    A. 1 1 1 1 1
    B. 1 2 3 4 5
    C. 0 1 2 3 4
    D. 0 1 4 3 4

  • Question 149:

    Given:

    Which three statements concerning the OO concepts "is-a" and "has-a" are true?

    A. Flimmer is-a Plinkable
    B. Flommer has-a Tagget
    C. Flommer is-a Glommer
    D. Tagget has-a String
    E. Flommer is-a Plinkable
    F. Flimmer is-a Flommer
    G. Tagget is-a Plinkable

  • Question 150:

    Given:

    public class SleepOtherThread {

    public static void main(String[] args) throws InterruptedException {

    Runnable r = new Runnable() {

    public void run() {

    System.out.print(Thread.currentThread().getName());

    }

    };

    Thread t1 = new Thread(r, "One ");

    t1.start();

    t1.sleep(2000);

    Thread t2 = new Thread(r, "Two ");

    t2.start();

    t2.sleep(1000);

    System.out.print("Main ");

    }

    }

    What is the most likely result?

    A. Main One Two
    B. Main Two One
    C. One Two Main
    D. One Main Two
    E. Two Main One

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