JDBC Interfaces and Methods

Test your knowledge of Java Database Connectivity (JDBC) interfaces including DatabaseMetaData, ResultSetMetaData, ParameterMetaData, ResultSet, and DriverManager.

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following methods is defined in the DatabaseMetaData interface in Java database programming?

  1. getMaxTableLength()
  2. getMaxTables()
  3. getMaxCharLiteralLength()
  4. getMaxUserLength()
  5. getSchema()
Question 2 Multiple Choice (Single Answer)

Which of the following methods is not defined in the ResultSetMetaData interface?

  1. getColumnClassName(int column)
  2. getScale(int column)
  3. isCaseSensitive(int column)
  4. getColumnSize(int column)
  5. isSearchable(int column)
Question 3 Multiple Choice (Single Answer)

Which of the following methods is not defined in the DriverManager class in Java database programming?

  1. getConnection(String url, String user, String password)
  2. deregisterDriver(Driver driver)
  3. getLoginTimeout()
  4. registerDriver(Driver driver)
  5. getLog()
Question 4 Multiple Choice (Single Answer)

Which of the following methods is not defined in ParameterMetaData in Java database programming?

  1. isSigned(int param)
  2. isNullable(int param)
  3. getParameterCount()
  4. getParameterName(int param)
  5. getParameterType(int param)
Question 5 Multiple Choice (Single Answer)

Which of the following methods in DatabaseMetaData retrieves the maximum number of columns this database allows in a table?

  1. getMaxColumns()
  2. getMaxColumnsInTable()
  3. getMaxColsInTable()
  4. getMaxCols()
  5. None of these
Question 6 Multiple Choice (Single Answer)

Which of the following methods in Timestamp Class returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Timestamp object?

  1. getTime()
  2. Time()
  3. getMilliseconds()
  4. getTimeInMilliseconds()
  5. Milliseconds()
Question 7 Multiple Choice (Single Answer)

Which of the following methods is not defined in the DatabaseMetaData interface?

  1. allProceduresAreCallable()
  2. allTablesAreSelectable()
  3. autoCommitFailureClosesAllResultSets()
  4. dataDefinitionCausesTransactionCommit()
  5. allTablesSelected()
Question 8 Multiple Choice (Single Answer)

Which of the following methods is not defined in the ResultSet interface in Java?

  1. cancelRowUpdates()
  2. deleteRow()
  3. clearWarnings()
  4. deleteColumn()
  5. absolute(int row)
Question 9 Multiple Choice (Single Answer)

Which of the following methods is present in the ResultSet interface in Java database programming?

  1. moveToCurrentRow()
  2. moveToNextRow()
  3. moveToPreviosRow()
  4. moveToFirstRow()
  5. moveToLastRow()
Question 10 Multiple Choice (Single Answer)

Which of the following methods in the DatabaseMetaData retrieves the maximum number of characters this database allows for a column name?

  1. getMaxColumnLength()
  2. getMaxColumnNameLength()
  3. getMaxColNameLength()
  4. getMaxColLength()
  5. getColumnNameLength()
Question 11 Multiple Choice (Single Answer)

Which of the following methods in the ResultSet interface refreshes the current row with its most recent value in the database?

  1. rowRefresh()
  2. refreshRow()
  3. refreshIt()
  4. refreshAll()
  5. refreshCurrentRow()
Question 12 Multiple Choice (Single Answer)

Which of the following methods in DatabaseMetaData interface retrieves the JDBC driver's major version number?

  1. getMajorDriverVersion()
  2. getMajorVersion()
  3. getDriverVersion()
  4. getDriverMajorVersion()
  5. getDriversMajorVersion()
Question 13 Multiple Choice (Single Answer)

Which of the following methods is present in the DatabseMetaData interface in Java database programming?

  1. isReadOnly()
  2. isCurrency(int column)
  3. isDefinitelyWritable(int column)
  4. isWritable(int column)
  5. isReadOnly(int Column)
Question 14 Multiple Choice (Single Answer)

Which of the following methods is present in the ResultSetMetaData interface in Java database programming?

  1. isWritable(int column)
  2. isReadable(int column)
  3. getColumnsName(int column)
  4. getColumnsCount()
  5. getSchema(int column)
Question 15 Multiple Choice (Single Answer)

Which of the following methods in the ParameterMetaData interface retrieves the designated parameter's database-specific type name?

  1. getParameterName(int param)
  2. getParameterType(int param)
  3. getParameterTypeName(int param)
  4. getParameterNameType(int param)
  5. getTypeOfParameter(int param)