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

    Which two statements are true about RowSet subinterfaces?

    A. A jdbcRowSet object provides a JavaBean view of a result set.
    B. A cachedRowSet provides a connected view of the database.
    C. A FilteredRowSet object filter can be modified at any time.
    D. A webRowSet returns JSON-formatted data.

  • Question 32:

    Given:

    public class SampleClass {

    public static void main(String[] args)

    { SampleClass sc = new

    SampleClass(); sc.processCD();

    }

    private void processCD() {

    try (CDStream cd = new CDStream()) {

    cd.open();

    cd.read();

    cd.write("lullaby");

    cd.close();

    } catch (Exception e)

    { System.out.println("Exception

    thrown");

    }

    }

    class CDStream {

    String cdContents = null;

    public void open()

    { cdContents = "CD

    Contents";

    System.out.println("Opened CD stream");

    }

    public String read() throws Exception {

    throw new Exception("read error");

    }

    public void write(String str)

    { System.out.println("CD str is: " +

    str);

    }

    public void close() {

    cdContents = null;

    }

    What is the result?

    A. Compilation CD stream
    B. Opened CD thrown
    C. Exception thrown
    D. Opened CD stream CD str is: lullaby

  • Question 33:

    Consider the following five methods:

    Which method should you use to connect to a java Db database with JDBC 4.0, but not with previous versions of JDBC?

    A. getConnectionA
    B. getConnectionB
    C. getConnectionC
    D. getConnectionD
    E. getConnectionE

  • Question 34:

    Given a language code of fr and a country code of FR, while file name represents a resource bundle file name that is not the default?

    A. MessageBundle_fr_FR.properties
    B. MessageBundle_fr_FR.Profile
    C. MessageBundle_fr_FR.Xml
    D. MessageBundle_fr_FR.Java
    E. MessageBundle_fr_FR.locale

  • Question 35:

    Given the following code fragment:

    public static void main(String[] args)

    { Path tempFile = null;

    try {

    Path p = Paths.get("emp");

    tempFile = Files.createTempFile(p, "report", ".tmp");

    try (BufferedWriter writer = Files.newBufferedWriter(tempFile, Charset.forName("UTF8")))){

    writer.write("Java SE 7");

    }

    System.out.println("Temporary file write done");

    } catch(IOException e) {

    System.err.println("Caught IOException: " + e.getMessage());

    }

    }

    What is the result?

    A. The report.tmp file is purged during reboot.
    B. The report.tmp file is automatically purged when it is closed.
    C. The report.tmp file exists until it is explicitly deleted.
    D. The report.tmp file is automatically purged when the execution of the program completes.

  • Question 36:

    Given the code fragment: String query = "SELECT ID FROM Employee"; \\ Line 1 try (Statement stmt = conn.CreateStatement()) { \\ Line 2 ResultSet rs = stmt.executeQuery(query); \\ Line 3 stmt.executeQuery ("SELECT ID FROM Customer"); \\ Line 4 while (rs.next()) { \\process the results

    System.out.println ("Employee ID: " + rs.getInt("ID") );

    }

    } catch (Exception e) {

    system.out.println ("Error");

    }

    Assume that the SQL queries return records. What is the result of compiling and executing this code fragment?

    A. The program prints employees IDs.
    B. The program prints customer IDs.
    C. The program prints Error.
    D. Compilation fails on line 13.

  • Question 37:

    Given:

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

    try {

    processFile();

    } catch(Exception e) {

    Throwable [] t = e.getSuppressed();

    }

    }

    public static void processFile() throws IOException

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

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

    java.util.zip.ZipFile zf = new java.util.zip.ZipFile("alllogs.zip");

    System.out.println("Created files for logs");

    }

    }

    The getSuppressed method returns an array of .

    A. Allexceptions that were thrown in the processFile method but were suppressed.
    B. Exceptions suppressed because that are not declared in the throws clause.
    C. Only runtime exceptions that were thrown in the processFile method but were suppressed.
    D. Only runtime exceptions that were thrown in the processFile method but were not declared in throws clause.

  • Question 38:

    Which two scenarios throw FileSystemNotFoundException when the paths.get(URI) method is invoked?

    A. When preconditions on the uri parameter do not hold
    B. When the provider identified by the URI'S scheme component is not installed
    C. When a security manager is installed and it denies an unspecified permission to acess the file system.
    D. When the file system identified by the uri does not exist and cannot be created automatically
    E. When the path string cannot be converted to a Path

  • Question 39:

    Given:

    Person

    public Person(int id)

    public int getid()

    public String getContactDetails()

    public void setContactDetails(String contactDetails)

    public String getName()

    public void setName(String name)

    public Person getPerson(int id) throws Exception

    public void createPerson(int id) throws Exception

    public Person deletePerson(int id) throws Exception

    public void updatePerson(Person p) throws Exception

    Which group of methods is moved to a new class when implementing the DAO pattern?

    A. public int getId () public String getContractDetails () public void setContactDetails (String ContactDetails) public void getName () public Person setName (String name)
    B. public int getId () public String getContractDetails () public void getName () public person getPerson (int id) throws Exception
    C. public void setContactDetails(String contactDetails) public void setName (String name)
    D. public person getPerson(int id) throws Exception public void createPerson (person p) throws exception public void deleteperson(int id) throws Exception public void updatePerson (Person p) throws Exception

  • Question 40:

    Given:

    ConcurrentMap partList = new ConcurrentHashMap<> ();

    Which fragment puts a key/value pair in partList without the possibility of overwriting an existing key?

    A. partList.put (key,"Blue Shirt");
    B. partList.putAbsent(key,"Blu Shirt")
    C. partList.putIfNotLocked (key,"Blue Shirt");
    D. partList.putAtomic (key,"Blue Shirt");
    E. if (!partlist.containsKey(key)) partList.put(key,"Blue Shirt");

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.