Java Database Interfaces

Concept Based Questions

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following methods is present in the Result set interface in java database programming?

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

Which of the following methods in ResultSet interface returns true to check whether the current row has been updated in a table?

  1. rowUpdated()
  2. isUpdated()
  3. hasUpdated()
  4. Updated()
  5. isRowUpdated()
Question 3 Multiple Choice (Single Answer)

Which of the following methods in ResultSet interface returns true to indicate whether the current row has had an insertion or not?

  1. isRowInserted()
  2. hasInserted()
  3. isInserted()
  4. rowInserted()
  5. Inserted()
Question 4 Multiple Choice (Single Answer)

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

  1. getColumnName(int column)
  2. getColumnType(int column)
  3. getColumnTypeName(int column)
  4. getColumnNameType(int column)
  5. getColTypeName(int column)
Question 5 Multiple Choice (Single Answer)

Which of the following methods is not defined in the SQLException class in java?

  1. getErrorCode()
  2. getNextException()
  3. getPreviousException()
  4. getSQLState()
  5. setNextException(SQLException ex)
Question 6 Multiple Choice (Single Answer)

How many constructors of class SQLTimeoutException are there in java database programming?

  1. 10
  2. 9
  3. 8
  4. 7
  5. 6
Question 7 Multiple Choice (Single Answer)

Which of the following methods is not present in the Connection interface in java database programming?

  1. abort(Executor executor)
  2. createStatement()
  3. getMetaData()
  4. getNetworkTimeout()
  5. createXMLSQL()
Question 8 Multiple Choice (Single Answer)

Which of the following methods is not defined in the DataTruncation class in java database programming?

  1. getTransferSize()
  2. getDataSize()
  3. getRead()
  4. getWrite()
  5. getIndex()
Question 9 Multiple Choice (Single Answer)

Which of the following methods is not present in the Statement interface in java database programming?

  1. addBatch(String sql)
  2. closeOnCompletion()
  3. executeQuery(String sql)
  4. executeBatch()
  5. getResults()
Question 10 Multiple Choice (Single Answer)

Which of the following methods is present in the Connection interface in java database programming?

  1. isValid(int timeout)
  2. isReadable()
  3. isWritable()
  4. isInvalid(int timeout)
  5. isPrepared()
Question 11 Multiple Choice (Single Answer)

Which of the following methods in ResultSet interface returns true to indicate whether a row has been deleted?

  1. isDeleted()
  2. Deleted()
  3. rowDeleted()
  4. hasDeleted()
  5. isRowDeleted()
Question 12 Multiple Choice (Single Answer)

How many methods are defined in the Time class in java?

  1. 10
  2. 9
  3. 8
  4. 7
  5. 6
Question 13 Multiple Choice (Single Answer)

Which of the following methods is present in the Statement interface in java database programming?

  1. isCloseOnInsertion()
  2. isCloseOnCompletion()
  3. isCloseOnDeletion()
  4. isCloseAfterUpdate()
  5. isCloseAfterInsertion()
Question 14 Multiple Choice (Single Answer)

Which of the following methods is/are present in the Connection interface in java database programming?

  1. setSavepoint()
  2. setSavepoint(String name)
  3. getConnection()
  4. Both 1 and 2
  5. Both 2 and 3
Question 15 Multiple Choice (Single Answer)

Which of the following methods is not present in the PreparedStatement interface in java database programming?

  1. addBatch()
  2. executeQuery()
  3. executeBatch()
  4. execute()
  5. getMetaData()