2. Which are required parts of a
JDBC URL? (Choose all that apply.)
A. Connection parameters
B. Database name
C. jdbc
D. Location of database
E. Port
F. Password
In the book only B and C are correct.
But if I want to create a Database using mySQL I need the location not the database name. What should I expect for the exam?.
16. Suppose that you have a table with three rows. The names in those rows are Anna, Betty,
and Cat. What does the following output?
A. Anna
B. Betty
C. Cat
D. The code does not compile.
E. A SQLException is thrown.
Actually using mySQL this runs fine, even with a explicit TYPE_FORWARD_ONLY, seems logical because the implementation depends on the vendor.
Using DERBY fails in the same way as the book.
18. Suppose that you have a table animal with three rows. The names in those rows are Anna,
Betty, and Cat. What does the following output?
A. Anna
B. Betty
C. Cat
D. The code does not compile.
E. A SQLException is thrown.
This one is in the errata page already, but it will return Anna using mySQL, but a runtime exception with DERBY.