Inheritance

In java, there are 3 types of inheritance

  1. single level
  2. multilevel
  3. hierarchical

No multiple and hybrid inheritance is there because it violates security. A user can make single class and use other multiple classes which violates security.

we cannot create an object of an abstract class. sealed classes also cannot be inherited.

Polymorphism: same name with multiple classes.

Programs to illustrate concept of method overloading.

Use of super keyword.

Advertisements

Constructive and genuine appreciation and/or criticism most welcome

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s