1z0-809 Exam Question 91

For which three objects must a vendor provide implementations in its JDBC driver?
  • 1z0-809 Exam Question 92

    Given the code fragments:
    class MyThread implements Runnable {
    private static AtomicInteger count = new AtomicInteger (0);
    public void run () {
    int x = count.incrementAndGet();
    System.out.print (x+" ");
    }
    }
    and
    Thread thread1 = new Thread(new MyThread());
    Thread thread2 = new Thread(new MyThread());
    Thread thread3 = new Thread(new MyThread());
    Thread [] ta = {thread1, thread2, thread3};
    for (int x= 0; x < 3; x++) {
    ta[x].start();
    }
    Which statement is true?
  • 1z0-809 Exam Question 93

    Given the code fragment:
    9.Connection conn = DriveManager.getConnection(dbURL, userName, passWord);
    10.
    String query = "SELECT id FROM Employee";
    11.
    try (Statement stmt = conn.createStatement()) {
    12.
    ResultSet rs = stmt.executeQuery(query); 13.stmt.executeQuery("SELECT id FROM Customer");
    14.
    while (rs.next()) {
    15.
    //process the results 16.System.out.println("Employee ID: "+ rs.getInt("id")); 17.}
    18.
    } catch (Exception e) {
    19.
    System.out.println ("Error");
    20.
    }
    Assume that:
    The required database driver is configured in the classpath.
    The appropriate database is accessible with the dbURL, userName, and passWord exists.
    The Employee and Customer tables are available and each table has id column with a few
    records and the SQL queries are valid.
    What is the result of compiling and executing this code fragment?
  • 1z0-809 Exam Question 94

    Given the code fragment:

    Assume that:
    The required database driver is configured in the classpath.
    The appropriate database is accessible with the dbURL, userName, and passWordexists The Employeetable has a column ID of type integer and the SQL query matches one record.
    What is the result?
  • 1z0-809 Exam Question 95

    Given:

    and

    Which interface from the java.util.function package should you use to refactor the class Txt?