• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interface

 
Saurabh Saha
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Please tell me can we create object of interface.

Thanks,
Vivek
 
kashif hameed
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no way to create the instence of Interface.
 
Arundhathi Menon
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
You could create a class that implements that interface and hence use that class's objects to access its methods.
regards
Menon
 
Nikhilesh Fonseca
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey !!
You could consider an Interface to be like an abstratct class
that is a class which cannot be instantiated since it has methods which have to be implemented in some other class which extends it.
If you recall a class which does not implement all the methods of an interface itself becomes an abstratct clss .
I hope this is clear ..
 
Saurabh Saha
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks to All.
now it's clear to me that we can't create instance of interface.

Vivek
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic