The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

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:

one more difference

Posted by saddy on May 10, 2001 at 10:20 AM

>
hello
adding to the difference mentioned by Mr. Siddhanth kumar there is one more notable difference between Interface and Abstract Class. in an Inteface by default all the instance variables are static as well as final but there is no such restriction in Abstract Classes

thanx
saddy
> In abstract class u can declare as well as define the methods. means there will be body of the methods in abstract class. but in interfaces u define most common methods are declared only, i.e. signature of the methode is placed in the interface.

> bye Siddhant Kumar
> INDIA
> > Hi,
> > I have one doubt regarding Abstract Classes and interfaces.
> > Tell me exact differences between these with clear example.
> > Thanks,
> > Balaji





Replies:

Sponsored Links



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