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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a jdbc connection string?

931


How can you use preparedstatement in jdbc?

988


What is the difference between execute, executeQuery, executeUpdate?

1019


What is jdbc thin client in oracle?

896


Which package is used for jdbc application?

973


How we can you use preparedstatement.

967


Is it possible to connect to multiple databases? Using single statement can we update or extract data from two or three or many databases?

1072


What are JDBC Best Practices?

1093


What is the function of setautocommit?

1230


How do I stop nullpointerexception?

965


Which Java and java.sql data types map to my specific database types?

1058


What is the return type of class.forname() method?

944


Is jdbc a web technology?

884


Explain the process of creating tables using NetBeans IDE?

967


Explain about multiple implementations and drive manager?

1041