Saturday, April 8, 2017

Hierarchical Inheritance

Hierarchical inheritance is refer to one to many relationship. That means one superclass has more than one subclasses. Example: Animal


class Animal
{

}

class Dog extends Animal
{

}

class Cat extends Animal
{

}

class Rat extends Animal
{

}

No comments:

Post a Comment

Abstraction vs Interface

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