Friday, March 13, 2009

Consider the following code:

Question :Consider the following code:
Connection con = DriverManager.getConnection("some connection
What Exceptions can be thrown in the above statements?

Answer :The above statements can throw any or all of the following exceptions
LinkageError - if the linkage fails
ExceptionInInitializerError - if the initialization provoked by this method
ClassNotFoundException - if the class cannot be located
SQLException - if a database access error occurs

No comments: