Computers

Professional Development

Image

Core Java Assessment

11
plays

25 questions

Show Answers
See Preview
  • Multiple Choice
    Please save your changes before editing any questions.
    3 minutes
    1 pt

    Given that you are working with a JDBC 4.0 driver, which three are required for this JDBC driver to be compliant?

    Must include a META-INF/services/java.sql.Driver file

    Must provide implementations of Driver, Connection, Statement, and ResultSet interfaces

    Must support scrollable ResultSets

    Must support PreparedStatement and CallableStatement

    Must support transactions

  • Multiple Choice
    Please save your changes before editing any questions.
    3 minutes
    1 pt

    Which three are available through an instance of DatabaseMetaData?

    The number of rows returned

    The name of the JDBC driver

    The default transaction isolation level

    The last query used

    The names of stored procedures in the database

  • Multiple Choice
    Please save your changes before editing any questions.
    3 minutes
    1 pt

    Given this code fragment:

    Statement stmt = conn.createStatement();

    ResultSet rs;

    String query = "<QUERY HERE>";

    stmt.execute(query);

    if ((rs = stmt.getResultSet()) != null) {

    System.out.println("Results");

    }

    if (stmt.getUpdateCount() > -1) {

    System.out.println("Update");

    }

    Which query statements entered into <QUERY HERE> produce the output that follows the query string (in the following answer), assuming each query is valid? (Choose all that apply.)

    "SELECT * FROM Customer"

    Results

    . "INSERT INTO Book VALUES ('1023456789', 'One Night in Paris', '1984-10-20',

    'Hardcover', 13.95)"

    Update

    "UPDATE Customer SET Phone = '555-234-1021' WHERE CustomerID = 101"

    Update

    "SELECT Author.LastName FROM Author"

    Results

    . "DELETE FROM Book WHERE ISBN = '1023456789'"

    Update

  • Explore all questions with a free account

    Already have an account?