Sunday, April 9, 2017

Abstraction vs Interface

Abstract Interface
method abstract and concrete abstract only, support default and static method
multiple inheritance no (extend one class) yes (extends multiple interfaces)
variables final, non-final, static and non-static
default: declared as public, static, final
static, final
implementation provides interface implementation doesn't provide abstract class implementation
constructor allowed not allowed
keyword abstract (implicit: public, abstract) interface
inheritance implements multiple interfaces but
can extend one class
extends multiple interfaces

No comments:

Post a Comment

Abstraction vs Interface

Abstract Interface method abstract and concrete abstract only, support default and static method ...