1Z0-805 Exam Details

  • Exam Code
    :1Z0-805
  • Exam Name
    :Upgrade to Java SE 7 Programmer
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :90 Q&As
  • Last Updated
    :Dec 09, 2021

Oracle 1Z0-805 Online Questions & Answers

  • Question 71:

    The advantage of a CallableStatement over a PreparedStatement is that it:

    A. Is easier to construct
    B. Supports transactions
    C. Runs on the database
    D. Uses Java instead of native SQL

  • Question 72:

    In the Java SE7 API, which method is most commonly used by factories to instantiate objects?

    A. new ()
    B. make ()
    C. create ()
    D. getObject ()
    E. getInstance ()
    F. createObject ()

  • Question 73:

    Given:

    public class MyGrades {

    private final List myGrades = new ArrayList();

    private final ReadWriteLock rwlock = new ReentrantReadWriteLock();

    public void addGrade(Integer grade) {

    /*

    lock and modify

    */

    }

    public void averageGrades() {

    // acquire lock Line **

    double sum = 0;

    int i = 0;

    for (i = 0; i < myGrades.size(); i++) {

    sum += myGrades.get(i);

    }

    // release lock Line ***

    System.out.println("The average is: " + sum/(i+1));

    } } Which pair's statements should you insert at line ** and line *** (respectively) to acquire and release the most appropriate lock?

    A. rwlock.readLock().acquire(); rwlock.readLock().release();
    B. rwlock.readLock().lock(); rwlock.readLock().unlock();
    C. rwlock.getLock().acquire(); rwlock.getLock().release();
    D. rwlock.getLock().lock(); rwlock.getLock().Unlock();
    E. rwlock.WriteLock().acquire(); rwlock.writeLock().release();
    F. rwlock.writeLock().lock(); rwlock.WriteLock().unlock();

  • Question 74:

    Given the code fragment:

    Path path1 = Paths.get("D:\\sales\\.\\quarterly\\..\\report");

    path1 = path1.normalize();

    Path path2 = path1.relativize(Paths.get("d:\\empdetails.dat"));

    path2 = path2.resolve(path1);

    System.out.println(path1);

    System.out.println(path2);

    }

    What is the result?

    A. D: \sales\report
    B. \sales\report
    C. D: \sales\quarterly\ . . . \report
    D. \sales\report
    E. D: \sales\quarterly\ . . .\report
    F. \sales\report\empdetails.dat
    G. D: \sales\report
    H. \sales\report\empdetails.dat

  • Question 75:

    Which two fragments can be combined into a statement that returns an ExecuteService instance?

    A. Executors
    B. Executor
    C. ExecutorService
    D. .getSingleThreadExecutor ();
    E. .newSingleThreadExecutor ();
    F. .createSingleThreadExecutor ();
    G. .buildSingleThreadExecutor ();

  • Question 76:

    Which two statements are true?

    A. Implementing a DAO often includes the use of factory.
    B. To be implemented properly, factories rely on the private keyword.
    C. Factories are an example of the OO principle "program to an interface."
    D. Using factory prevents your replication from being tightly coupled with a specific Singleton
    E. One step in implementing a factory is to add references from all the classes that the factory will merge.

  • Question 77:

    Given the code fragment:

    List pList = new CopyOnWriteArrayList();

    Which statement is true?

    A. Read access to the List should be synchronized.
    B. Write access to the List should be synchronized.
    C. Person objects retrieved from the List are thread-safe.
    D. A Person object retrieved from the List is copied when written to.
    E. Multiple threads can safely delete Person objects from the List.

  • Question 78:

    Which statement is true about the DSYNC constant defined in standardopenoptions enums?

    A. DSYNC keeps only the file content and not the metadata synchronized with the underlying storage device.
    B. DSYNC keeps thefile (both content and metadata) synchronized with the underlying storage device.
    C. DSYNC keeps only the file metadata and not the file content synchronized with the underlying storage device.
    D. DSYNC keeps the file (both content and metadata) de-synchronized with copies in the und< storage device.

  • Question 79:

    Given the code fragment:

    dataFormat df;

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

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

  • Question 80:

    Given the code fragment:

    public void processFile() throws IOException, ClassNotFoundException {

    try (FileReader fr = new FileReader ("logfilesrc.txt");

    FileWriter fw = new FileWriter ("logfiledest.txt"))

    { Class c = Class.forName ("java.lang.JString");

    }

    }

    If exception occur when closing the FileWriter object and when retrieving the JString class object, which exception object is thrown to the caller of the processFile method?

    A. java.io.IOException
    B. java.lang.Exception
    C. java.lang.ClassNotException
    D. java.lang.NoSuchClassException

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