Sunday 27 December 2015

Advantage of interface in java

Interface is a mechanism to achieve fully abstraction. It's look looks like as class but not a class. It solve is with a powerful construct called interface.


It can be used to fully abstraction, generic template and multiple inheritance in java. It a blueprint of a class.



** Advantage of interface-



  1. Without bothering about implementation; we can achieve the security of implementation.
  2. Multiple interface can't be allow, however by using interface you can achieve the same.
  3. Interface are mainly used to provide polymorphic behavior.

No comments:

Post a Comment