Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

instantiate an interface?  RSS feed

 
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!