aspose file tools*
The moose likes Java in General and the fly likes All abstract methods Vs interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "All abstract methods Vs interface" Watch "All abstract methods Vs interface" New topic
Author

All abstract methods Vs interface

Vikas
Ranch Hand

Joined: Dec 16, 2004
Posts: 63
Hi All,

This is really a beginners' question and my question is if an abstract class has all of its methods "abstract" in it(i.e. no concrete methods) then what will be the difference between this abstarct class and an interface.

Thank you
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36508
    
  16
If all your methods are abstract you are better off writing an interface, because you can implement several interfaces in the same class, but only extend one class. Remember you usually miss out "public" and "abstract" in method declarations in interfaces.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: All abstract methods Vs interface
 
Similar Threads
Interface methods
interface and abstract
Difference between abstract and interfaces
Abstract Class & Interface
Have doubt in Interface.