Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / satish.svu

Connection is an interface, but the implementation class is
provided by the third party,

Here Connection interface object means the implementation
class object

Is This Answer Correct ?    18 Yes 0 No

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

Answer / kranthikumar.ch

Connection is Interface which cannot be instantiated but
can be referenced.
The DriverManager Class can provide the implementation for
that Connection interface.
Means rather than creating creating an object to
DriverManager Class creating reference to Connection
interface.

Is This Answer Correct ?    13 Yes 3 No

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

Answer / raja

write a connection interface class and sub class implemente
a interface .Now create object of interfacelike this
interface in=new SubclassName();

Is This Answer Correct ?    14 Yes 7 No

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

Answer / venkateswararao

connection interface is provided by the java , i.e they only
gives the interface but not implemented . this interface is
implemented by the oracle vendors ,So interface class is
implemented by data base vendors . So these methods are used
to connect data base
Connection con=Drivermanager.getConnection("url
path","username","password");
get connection is static method , So this method is calling
by DriverManager class

Is This Answer Correct ?    7 Yes 0 No

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

Answer / guest

Connection con=DriverManager.getConnection
("jdbc:odbc:MydataSource);"



Is This Answer Correct ?    7 Yes 4 No

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

Answer / .t.v.harish

Connection is an interface from java.sql package, for which
getConnection(_) was return an anonymous inner class object
of the Connection interface.

Note:- Anonymous inner class is a nameless inner class,
which can be sued to provide an implementation either for
the interfaces or for abstract classes.

T.V.HARISH

Is This Answer Correct ?    4 Yes 3 No

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

Answer / jk.yadav008

no answer

Is This Answer Correct ?    2 Yes 9 No

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

Answer / anand

We can not create object to any interface but we can create a reference variable to interface. Connection is an interface released by SUN micro system.Once interface released anybody in this world can provide implementation,provide implementation means writing down the code for all the methods of that inteface. As we know that Connection is an interface relased by sun micro system and Oracle corporation provide implementation class to that inteface and this class is called "Connetion class".We can create the reference variable to Connection interface and this reference variable hold the object of class which provide the implementation to Connection class.
DriverManager is also an interface and this interface contains a static method getConnection(), this method returns the object of a class which provide implementation of Connection interface.

Is This Answer Correct ?    0 Yes 7 No

Post New Answer

More JDBC Interview Questions

Name the new features added in jdbc 4.0.

0 Answers  


What is the role of class.forname while loading drivers?

0 Answers  


Differentiate between type_scroll_insensitive and type_scroll_sensitive.

0 Answers  


how you will execute the many tables data

1 Answers   Wipro,


What are the differences between setmaxrows(int) and setfetchsize(int)?

0 Answers  


What are collection pools?

0 Answers  


Write an sql to find all records having all numeric characters in a field ?

0 Answers  


How we say that PreparedStatment is Precompiled? where it will be compiled?

4 Answers   Logica CMG,


What is setautocommit in jdbc?

0 Answers  


Why do I have to reaccess the database for Array, Blob, and Clob data?

0 Answers  


Is jdbc and orm?

0 Answers  


Which database is used with java?

0 Answers  


Categories