1.
Which code fragment is required to load a JDBC 3.0 driver?
2.
What statement is true about thread starvation?
3.
Which two statements are true about RowSet subinterfaces?
4.
Given the code fragment: public static void main(String[] args) { Path dir = Paths.get("d:\\company"); // insert code here. Line ** for (Path entry: stream) { System.out.println(entry.getFileName()); } } catch (IOException e) { System.err.println("Caught IOException: " + e.getMessage()); } } Which two try statements, when inserted at line 11, enable you to print files with the extensions.java, .htm, end and .jar.
5.
Given the code fragment: Locale loc1 = Locale.getDefault (); ResourceBundle messages = ResourceBundle.getBundle("MessageBundle", loc1); Which two statements are a valid way to re-assign a resource bundle to a different Locale?
6.
Given: public class TemperatureSensor { public TemperatureSensor () { } public double getCurrTemp () { // . . . method to retrieve temperature from a sensor Return temp; } } Which three changes should you make to apply the singleton design pattern to this class?
7.
Consider the following database table:
Inventory Table
* Item_ID, Integer: PK
* Item_name, Varchar (20)
* Price, Numeric (10, 2)
* Quan, Integer
Consider the following method that updates the prices in the Inventory table:
public static void updatePrices{
// #1: missing line
Connection con) throws SQLException {
// #2: missing line
PreparedStatement updatePrices = con.prepareStatement (updatePricesString);
// #3: missing line
{
// #4: missing line
updatePrices.executeUpdate();
}
}

This method us missing four lines, which group of lines complete this method?
8.
Which is a key aspect of composition?
9.
Given: What two changes should you make to apply the DAO pattern to this class?
10.
Which two descriptions are benefits of using PreparedStatement objects over static SQL in JDBC?