wood burning stoves*
The moose likes Beginning Java and the fly likes Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Interface" Watch "Interface" New topic
Author

Interface

Saurabh Saha
Ranch Hand

Joined: Dec 08, 2004
Posts: 52
Hi All,
Please tell me can we create object of interface.

Thanks,
Vivek
kashif hameed
Greenhorn

Joined: Jun 15, 2003
Posts: 15
There is no way to create the instence of Interface.
Arundhathi Menon
Ranch Hand

Joined: Jan 14, 2004
Posts: 113
Hi!
You could create a class that implements that interface and hence use that class's objects to access its methods.
regards
Menon


SCJP , SCWCD , SCBCD , SCDJWS
Nikhilesh Fonseca
Ranch Hand

Joined: Aug 23, 2004
Posts: 57
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

Joined: Dec 08, 2004
Posts: 52
Hi,
Thanks to All.
now it's clear to me that we can't create instance of interface.

Vivek
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Interface