This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Posted by Sudhakar on October 14, 2000 at 2:56 AM
I too am really confused with this concept of abstract classes and static methods...There are so many methods (like beep() in the Toolkit class) which are abstract type (also the class is also abstract). in this case if I have to override the method for beep, whats the use of such a method definition in the library if i cant use it to generate a beep sound using it? Similarly, there are many other methods that seem to put me in a similar situation. Please tell me how I could use these methods defined in the library.
> Hello Chidambaram,
> Be cool. It's simple .Both are actually skeletons of the actual
> implementations of a particular method inside a class. When you
> talk about an abstract class, you can have abstract methods as well as
> non-abstract methods in the class. Usually we keep this type of
> class as super class so that the functionality of the methods
> can be easily implemented in subclasses. If you do not
> implement an abstract method in a subclass, then your subclass
> automatically becomes abstract.
> Interfaces will be having only non-implemented methods.
> Remember you can put only skeletons in interface so that the
> subclasses can implement the functionalities.
> Relationship between abstract and interface is, in JAVA you can use
> interfaces for multiple inheritance as JAVA doesn't support it
> Best of luck.
> Ajith Paul.