Pages

Showing posts with label abstract. Show all posts
Showing posts with label abstract. Show all posts

Saturday, July 15, 2017

Difference Between Interface And Abstract Class In JAVA

Difference Between Interface And Abstract Class In JAVA



Read more »

Sunday, June 11, 2017

Difference Between Interface and Abstract Class

Difference Between Interface and Abstract Class


Interfaces
--contain only abstract methods
--interface cant be inherited from a class
--using interfaces we can achieve multiple inheritance
--doesnt allow accessibility modifiers (Public/Private/Internal)
--cant contain fields, constructors
--is must implementable & its scope is upto any level of its inheritence chain.

Abstract Class
--contain both abstract methods as well as concrete methods
--can extend another class and implement multiple interfaces
--we cant achieve multiple inheritance
--allows accessibility modifiers
--can contain fields, constructors
--class Abstract class is must inheritable & its scope is upto derived class
Read more »