getConnection():As java static rules suggest that it should access by class name only and DriverManager implements Connection interface whose static method getConnection() is called with the name of DriverManager, thus getConnection() is static and no other thread should create connection on the same resource at the same time, it is declared as synchronized also.
Category:JDBC Interview Questions
No comments:
Post a Comment