• Post Reply Bookmark Topic Watch Topic
  • New Topic

instantiate an interface?

 
mihir maniar
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in jave as far as i know that u cannot instantiate interfaces then how is it possible that DriverManager gives u a object of connection whereas connection is an interface and to be precise it is a public abstract interface.Please help me clear this doubt. thank you.
[ July 27, 2004: Message edited by: Bear Bibeault ]
 
Kalai Selvan
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mihir,
Actually DriverManager.getConnection() returns an object which implements Connection Interface.

bye,
Kalai S.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!