How to create Connection interface object because it is
Interface , Interface is not instansiated?

Answer Posted / mohd gousuddin

Connection is an interface which can not be instantiated but
can be referenced. The DriverManager Class is a Factory
class which contains a factory method called
getConnection(). this method creates and returns connection
object, that object can be assigned to Connection interface
referance variable.

Is This Answer Correct ?    22 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I set properties for a JDBC driver and where are the properties stored?

498


What are the new features added to JDBC 4.0?

543


Is jdbc secure?

514


What is device controller?

526


How do I find jdbc version?

536






Is jdbc a framework?

478


How to check jdbc connection in linux?

517


What is jdbc type?

517


What are different parts of a url?

509


How can we move the cursor in a scrollable result set?

551


How do I check in my code whether a maximum limit of database connections have been reached?

583


What are devices?

496


What is data source in java?

532


What is correlated subquery?

1749


How many locking systems are there in jdbc?

561