24
I had to answer this question with some code:
Suppose I wrote the following method specification:
public void manipulateData ( ) throws java.sql.SQLException, java.sql.SQLDataExceptionYou are writing code for a database program that will use this method and you want to handle each specifically. What should the try/catch clause look like?
You can use no-ops-- empty blocks {}--for the catch clause contents.
We are only interested in the syntax and structure of the statements here.
I answered with this:
try {
} catch(java.sql.SQLException e) {
}
catch(java.sql.SQLDataException e) {
}
He did not accept the answer for this reason:
"Your catch clauses are in the wrong order. Can you explain why the order matters?"
Is he correct in his answer?