CodesJava

Easy learning with example program codes

Are interfaces also inherited from Object class?


No, interfaces not inherited from object class.

Inheritance

Inheritance is a way to implement IS-A relationship i.e. parent child relationship. Subclass inherits the super class properties like data member, methods. Inheritance is the way of re-usability of code.

Interface

Interface is a way of implementing 100% abstraction. An interface is declared with interface keyword. It can contain only abstract methods and static final data members Or Interface is a group of related abstract methods.

Java nterview questions on inheritance



Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap