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.


Use of defining a class as abstract

Posted by Jesal on December 10, 2001 at 4:15 AM

> Why might we wish to define an abstract class?


An abstract class is defined so as to give a generalised form which can be shared by its subclasses. Sometimes a situation may occur where in one need to define a superclass which can declare a structure for its subclasses but cannot create the meaningful implementation for a method.

So the subclass according to its necessity extend this abstract class and use the methods decalred with its own customized implementation of the method.

  • Abstraction Matt Gerrans December 10, 2001 at 5:27 PM (0)

Sponsored Links

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