The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
May 2000



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 Artima Forums.


ans to abstract and interface

Posted by Paul Ajith on September 30, 2000 at 3:35 AM

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.

  • Hello sir Sudhakar October 14, 2000 at 2:56 AM (0)

Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us