Sunday, November 8, 2009

Difference Between Interface And Abstract Class

Difference between interface and abstract class.

1.Abstract classes can have implementations for some of its
members (Methods), but the inteface class can't have
implementation for any of its members.

2.Abstract class defines few or none of the methods, but
interface defines all the methods.

3 Abstract classes should have subclasses else that will
be useless.

4.Interfaces must have implementations by other classes else
that will be useless.

5.Only an interface can extend another interface, but any
class can extend an abstract class.

6.All variable in interfaces are final by default.

7.Accessibility modifier(Public/Private/internal) is
allowed for abstract class.Interface doesn't allow accessibility modifier







0 Comments:

Post a Comment

The Link Exchange - Your ultimate resource for link exchange!

About This Blog

  © Blogger template Webnolia by Ourblogtemplates.com 2009

Back to TOP