File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Use of Abstract Interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Use of Abstract Interfaces" Watch "Use of Abstract Interfaces" New topic
Author

Use of Abstract Interfaces

Java Programmer
Greenhorn

Joined: Apr 20, 2004
Posts: 9
When will we use abstract interfaces and how ? pls. help me out
& Why interfaces cannot be instantiated ? are abstract classes instantiated ?
Do tell with good examples


Smiling on Java
Tim West
Ranch Hand

Joined: Mar 15, 2004
Posts: 539
Interesting, a very similar topic was discussed in this forum not-so-long ago, here.
I'd look at Bruce Eckel's Thinking In Java for excellent discussion and examples.
If I were you, I'd also consider reading this.
--Tim
[ April 22, 2004: Message edited by: Tim West ]
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
First thing that Interface are always abstrat and can't be instantiated because they only declare methods in it not define them thats why they can't get instantiated same is for abstract class that it might 1 or more methods which it doesn't implement or define thats why we can't make object of abstract classes too.
Both are very useful at different places. I think you don't have the idea of polymorphism and inheritance thats why you asked that question. Do read these concepts and it will be clear.
 
Don't get me started about those stupid light bulbs.
 
subject: Use of Abstract Interfaces