Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1. 1. (TCOs 1, 5, and 6) To add a database driver to a NetBeans project, you can add the JAR file for the

Question 1.1. (TCOs 1, 5, and 6) To add a database driver to a NetBeans project, you can add the JAR file for the driver to what folder? (Points : 4)
The Source Packages folder The Libraries folder The Files folder The Services folder

Question 2.2. (TCOs 16) _____ represents an entity in the real world that can be distinctly identified. (Points : 4)
A class An object A data field A method

Question 3.3. (TCOs 16) Which of the following statements is true regarding the following code assuming a proper database connection has been made and the statement object properly created? ResultSet resultSet = statement.executeQuery("select firstName, mi, lastName from Student"); System.out.println(resultSet.getString(1)); (Points : 4)
resultSet.getString(1) returns the lastName field in the result set. If the SQL SELECT statement returns no result, resultSet is null. resultSet.getString(1) returns the mi field in the result set. The program will have a runtime error, because the cursor in resultSet does not point to a row. You must use resultSet.next() to move the cursor to the first row in the result set. Subsequently, resultSet.next() moves the cursor to the next row in the result set.

Question 4.4. (TCOs 16) What is the return value from the following? stmt.executeUpdate("insert into T values (100, 'Smith')"); (Points : 4)
An int value indicating how many rows are effected from the invocation An object that contains the status of the execution A value indicating whether the SQL statement has been executed successfully Void

Question 5.5. (TCOs 16) Invoking Class.forName method when the database driver has not been configured into the project may throw (Points : 4)
ClassNotFoundException. IOException. SQLException. RuntimeException.

Question 6.6. (TCOs 16) Which of the following statements is used to create an object to write to a file named out.dat? (Points : 4)
BufferedWriter outfile = new BufferedWriter(FileWriter("out.dat")); BufferedWriter outfile = new BufferedWriter (new File("out.dat")); BufferedWriter outfile = new BufferedWriter (new FileWriter("out.dat")); BufferedWriter outfile = new BufferedWriter ("out.dat");

Question 7.7. (TCOs 16) Which type of exception occurs when creating a BufferedReader object for a nonexistent file? (Points : 4)
FileNotExist FileNotFound FileNotExistException FileNotFoundException

Question 8.8. (TCOs 16) Which class can be used to read data into a text file? (Points : 4)
BufferedReader System ReadFile FileRead

Question 9.9. (TCOs 16) Result set meta data are retrieved through (Points : 4)
a Statement object. a Connection object. a ResultSet object. a PreparedStatement object.

Question 10.10. (TCOs 16) Which of the following statements is false? (Points : 4)
All the methods in JRadioButton are inherited from javax.swing.AbstractButton. You can use an icon on JRadioButton. JButton and JRadioButton fire same types of events. All the methods in JRadioButton are also in JButton.

Question 11.11. (TCOs 16) The method _____ gets the contents of the text field txtName. (Points : 4)
txtName.findString() txtName.getText(s) txtName.getString() txtName.getText()

Question 12.12. (TCOs 16) The method _____ appends a string s into the text area jta. (Points : 4)
jta.appendText(s) jta.append(s) jta.setText(s) jta.insertText(s)

Question 13.13. (TCOs 16) Which of the following statements is false? (Points : 4)
You can create a text field with a specified text. You can disable editing on a text field. You can specify the number of rows in a text field You can specify the number of columns in a text field.

Question 14.14. (TCOs 16) A JList object can be populated with data stored in a(n) _____ object. (Points : 4)
ModelList DefaultListModel ListArray DefaultModelList

Question 15.15. (TCOs 16) The _____ method of a check box returns true if that button is checked. (Points : 4)
isSelected() getSelected() Selected() isChecked()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions