The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2000

Advertisement

Advertisement

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.

Message:

good question

Posted by Prakash on January 17, 2001 at 10:36 AM

> An abstract class can grow whereas an interface cannot. When you inherit from an abstract class and later on if you want to add a new method or memeber variable then you can do that and all existing derived classes and their uses ( if you have already used derived classes in your code ) are still valid ( of course, you will have to provide some default implementation of new methods ). But if you have created and used an interface then you cannot add a new method to that interface without rewritng the existing code.





Replies:

Sponsored Links



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