Question: Code example 1 6 - 2 public static void connectAndOpenDB ( ) { try { StudentDB.connect ( ) ; / / can throw a ClassNotFoundException

Code example 16-2 public static void connectAndOpenDB(){ try { StudentDB.connect(); //can throw a ClassNotFoundException StudentDB.open(); //can throw an SQLException } catch(ClassNotFoundException | SQLException e){ System.out.println(e.getMessage()); } System.out.println("Connected and opened."); }(Refer to code example 16-2.) Which of the following is true if an SQLException is thrown? Question 10 options: a) The println method after the catch clause was not called. b) Neither of the statements that use the println method were called. c) A ClassNotFoundException was also thrown. d) A ClassNotFoundException was not thrown.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!