File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Interface" Watch "Interface" New topic


Saurabh Saha
Ranch Hand

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

kashif hameed

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
You could create a class that implements that interface and hence use that class's objects to access its methods.

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
Thanks to All.
now it's clear to me that we can't create instance of interface.

I agree. Here's the link:
subject: Interface
Similar Threads
Home interface or Home Interface stub
How To Call Two Different Classes From the Main Program Using the Same API?
Regarding Interfaces
Writing an Interface
Time Capsule