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

    Given the code fragment:

    public class Test {

    public static void main (String [] args) {

    Path path1 = Paths.get("D:\\sys\\asm\\.\\data\\..\\..\\mfg\\production.log");

    System.out.println(path1.normalize());

    System.out.println(path1.getNameCount());

    }

    }

    What is the result?

    A. D:\sys\mfg\production.log
    B. D:\\sys\\asm\\.\\data\\. . \\mfg\\production.log
    C. D: \\sys\\asm\\.\\data\\. . \\mfg\\production.log
    D. D: \sys\mfg\production.log
    E. D: \\ sys\\asm\\data\\mfg\\production.log

  • Question 12:

    Given the incomplete pseudo-code for a fork/join framework applications:

    submit (Data) {

    if (Data.size < SMALL_ENOUGH) {

    (Data); // line X

    }

    else {

    List x = (Data); // line Y

    for(Data d: x

    (d); // line Z

    }

    }

    And give the missing methods:

    Process, submit, and splitInHalf

    Which three insertions properly complete the pseudo-code?

    A. Insert submit at line X
    B. Insert splitHalf at line X
    C. Insert process at line X
    D. Insert process at line Y
    E. Insert splitHalf at line Y
    F. Insert process at line Z
    G. Insert submit at line Z

  • Question 13:

    The default file system includes a logFiles directory that contains the following files: log ?Jan2009 log_01_2010 log_Feb2010 log_Feb2011 log-sum-2012

    How many files the matcher in this fragment match?

    PathMatcher matcher = FileSystems.getDefault ().getPathMatcher ("glob:???_*1");

    A. One
    B. Two
    C. Three
    D. Four
    E. Five
    F. Six

  • Question 14:

    Which two code blocks correctly initialize a Locale variable?

    A. Locale loc1 = "UK";
    B. Locale loc2 = Locale.get Instance ( "ru" );
    C. Locale loc3 = Locale.getLocaleFactory("RU");
    D. Locale loc4 = Locale.UK;
    E. Locale loc5 = new Locale("ru", "RU");

  • Question 15:

    Which two Capabilities does Java.util.concurcent.BlockingQueue provide to handle operation that cannot be handled immediately?

    A. Automatically retry access to the queue with a given periodicity.
    B. Wait for the queue to contain elements before retrieving an element.
    C. Increase the queue's capacity based on the rate of blocked access attempts.
    D. Wait for space to become available in the queue before inserting an element.

  • Question 16:

    Which code fragments print 1?

    A. String arr [] = {"1", "2", "3"}; List
    B. String arr [] = {"1", "2", "3"}; List arrList = new LinkedList (Arrays.asList (arr)); System.out.println (arrList.get (0));
    C. String arr [] = {"1", "2", "3"}; List arrList = new LinkedList (Arrays.asList (arr)); System.out.println (arrList.get (0));
    D. String arr [] = {"1","2","3"}; List arrList = new LinkedList (Arrays.asList (arr)); System.out.println (arrList.get (0));
    E. String arr [] = {"1","2","3"}; List extendsString > arrList =new LinkedList (Arrays.asList (arr)); System.out.println (arrList.get (0));

  • Question 17:

    Consider the following database table:

    Inventory Table

    *

    Item_ID, Integer: PK

    *

    Item_name, Varchar (20)

    *

    Price, Numeric (10, 2)

    *

    Quan, Integer

    Consider the following method that updates the prices in the Inventory table:

    public static void updatePrices{

    // #1: missing line

    Connection con) throws SQLException {

    // #2: missing line

    PreparedStatement updatePrices = con.prepareStatement (updatePricesString);

    // #3: missing line

    {

    // #4: missing line

    updatePrices.executeUpdate(); }

    }

    This method us missing four lines, which group of lines complete this method?

    A. 1. HashMap newPrices, 2. StringupdatePriceString ="UPDATE inventory SET price =? WHERE item_name'?'"; 3. For (map.Entry x : newPrices.entrySet()) 4. UpdatePrices.setFloat(1, x.getvalue().floatValue()); updatePrice.setString (2, x.getKey());
    B. 1. HashMap newPrices, 2. StringupdatePriceString ="UPDATE inventory SET price =? WHERE item_id '?'"; 3. For (map.Entry x : newPrices.entrySet()) 4. UpdatePrices.setFloat(1, x.getvalue().floatValue()); updatePrice.setString (2,
    C. getKey().intValue());
    D. 1. HashMap newPrices, 2. StringupdatePriceString = "UPDATE inventory SET price =? Where item_id `?' "; 3. For (map.Entry x : newPrices.entrySet()) 4. UpdatePrices.setInt(1, x.getvalue().floatValue()); updatePrice.setString (2, x.getvalue());
    E. 1. HashMap newPrices, 2. StringupdatePriceString = "UPDATE inventory SET price =? Where item_id `?' "; 3. For (map.Entry x : newPrices.entrySet()) 4. UpdatePrices.setInt(1, x.getvalue().floatValue()); updatePrice.setString (2,
    F. getvalue().floatValue()
    G. 1. HashMap newPrices, 2. StringupdatePriceString = "UPDATE inventory SET price =? Where item_id `?' "; 3. For (map.Entry x : newPrices.entrySet()) 4. UpdatePrices,setString(1, x.getKey()); updatePrices.setFloat(2, x.getValue().floatValue());
    H. 1. HashMap newPrices, 2. StringupdatePriceString = "UPDATE inventory SET price =? Where item_id `?' "; 3. For (Integer x: newPrice) 4. updatePrice.setInt(1, x);

  • Question 18:

    Given the following code fragment:

    public class Calc {

    public static void main (String [] args) {

    //* insert code here Line **

    System.out.print("The decimal value is" + var);

    }

    }

    Which three code fragments, when inserted independently at line **, enable the code to compile/

    A. int var = 0b_1001;
    B. long var = 0b100_01L;
    C. float var = 0b10_01; D. float var = 0b10_01F; E. double var = 0b10_01;
    D. double var = 0b10_01D;

  • Question 19:

    View the Exhibit:

    Given the following code fragment:

    class Finder extends SimpleFileVisitor {

    private final PathMatcher matcher;

    private static int numMatches = 0;

    Finder() {

    matcher = FileSystems.getDefault().getPathMatcher("glob:*java");

    }

    void find(Path file) {

    Path Name = file.getFileName();

    if (name != null andand matcher.matches(name)) {

    numMatches++;

    }

    }

    void report()

    {

    System.out.println("Matched: " + numMatches);

    }

    @Override

    public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {

    find(file);

    return CONTINUE;

    }

    }

    public class Visitor {

    public static void main(String[] args) throws IOException

    { Finder finder = new Finder();

    Files.walkFileTree(Paths.get("d:\\Project"), finder);

    finder.report();

    }

    }

    What is the result?

    A. Compilation fails
    B. 6
    C. 4
    D. 1
    E. 3

  • Question 20:

    Which two statements are true about the walkFileTree method of the files class?

    A. The file tree traversal is breadth-first with the given FileVisitor invoked for each file encountered.
    B. If the file is a directory, and if that directory could not be opened, the postVisitFileFailed method is invoked with the I/O exception.
    C. The maxDepth parameter's value is the maximum number of directories to visit.
    D. By default, symbolic links are not automatically followed by the method.

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.