Question 214 Pts Tcos 1 5 6 Must Make Available Application Use Jdbc Connect Database Data Q23521904

Question 214 pts

(TCOs 1, 5, and 6) What must you make available to yourapplication before you can use JDBC to connect to a database?

A database driver
A web server
A firewall
An ODBC data source

Flag this Question

Question 224 pts

(TCO 1-6) An object is an instance of a

method.
class.
data.
program.

Flag this Question

Question 234 pts

(TCOs 1–6) To execute the query “select * from Address” usingthe Statement object named stmt that has been properly configuredwith a database connection, use

stmt.executeUpdate(“select * from Address”);.
stmt.execute(“select * from Address”);.
stmt.executeQuery(“select * from Address”);.
stmt.query(“select * from Address”);.

Flag this Question

Question 244 pts

(TCOs 1–6) What is the return value from the following?
stmt.executeUpdate(“insert into T values (100, ‘Smith’)”);

An int value indicating how many rows are effected from theinvocation
An object that contains the status of the execution
A value indicating whether the SQL statement has been executedsuccessfully
Void

Flag this Question

Question 254 pts

(TCOs 1–6) Suppose a prepared statement is created asfollows.
PreparedStatement ps = conn.prepareStatement
(“insert into Student (fName, mi, lName) values (?, ?, ?)”);

To assign the value John to the first parameter of this query,use

ps.setString(1, “John”);.
ps.set (1, “John”);.
ps.setString(0, “John”);.
ps.set (0, “John”);.

Flag this Question

Question 264 pts

(TCOs 1–6) Which method can be used to read a whole line from afile opened with the BufferedReader object infile?

infile.nextLine()
infile.readNext()
infile.readLine()
readLine(infile)

Flag this Question

Question 274 pts

(TCOs 1–6) Which type of exception occurs when creating aBufferedReader object for a nonexistent file?

FileNotExist
FileNotFound
FileNotExistException
FileNotFoundException

Flag this Question

Question 284 pts

(TCOs 1–6) Which class can be used to write data into a textfile?

File
BufferedWriter
FileWrite
WriteFile

Flag this Question

Question 294 pts

(TCOs 1–6) Information about the types and properties of thecolumns of a ResultSet object can be obtained by using a _____object

ResultSetProperties
ResultSetData
ResultSetMetaData
ResultSetColumns

Flag this Question

Question 304 pts

(TCOs 1–6) _____ checks whether the JCheckBox jchk isselected.

jchk.isSelected().
jchk.selected()
jchk.select()
jchk.getSelected()

Flag this Question

Question 314 pts

(TCOs 1–6) The method _____ gets the contents of the text fieldtxtName.

txtName.findString()
txtName.getText(s)
txtName.getString()
txtName.getText()

Flag this Question

Question 324 pts

(TCOs 1–6) The method _____ appends a string s into thetext area jta.

jta.appendText(s)
jta.append(s)
jta.setText(s)
jta.insertText(s)

Flag this Question

Question 334 pts

(TCOs 1–6) The method _____ assigns the name Result to the Textof the label lblMsg.

lblMsg.findText()
lblMsg.text(“Result”)
lblMsg.setText(“Result”)
lblMsg.newText(“Result”)

Flag this Question

Question 344 pts

(TCOs 1–6) The item that is clicked in a JList can be retrievedusing the _____ method of JList.

getValue
getSelectedValue
getValueSelected
getData

Flag this Question

Question 354 pts

(TCOs 1–6) Which of the following statements is false?

To check whether a radio button jrb is selected, usejrb.isSelected().
By default, when a radio button is created, the radio button isnot selected.
You can create an instance of ButtonGroup and add radio buttonto the instance to group the buttons.
A GUI may have only one ButtonGroup.
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.