Method Overloading

Hi Friends,

In previous section, we have seen Inheritance and one kind of Polymorphism that is Overriding. In this section, we will delve further and see how Method Overloading works.

Method Overloading follows a set of rules. They are:-

  • Different Number of Parameters
  • Different Types of Parameters

One more important thing to understand here, signature of method means its name and parameter list not the return type.

Also, it’s important to understand difference between Overloading and Overriding.

  • Overloading means same method name with different parameters or types of parameters in the same class.
  • Overriding means virtual methods gets overridden in derived class.

Now, let’s look at the demo for the same. Below, I have added Overloaded method.

Now, let me go ahead and call the same from the main program as shown below.

With the above change in place, When I run the program, then it will produce the following output.


Since, this method is virtual, hence I can override this as well in the derived class as shown below.

Then, in the main class.


Which means, here method got overloaded and also overridden.

I hope you would have enjoyed this session. We’ll delve further in coming section. Till then, stay tuned and Happy coding.

Download Link:-

Rahul Sahay
Happy Coding

2,064 total views, 4 views today

Practical Inheritance

Hi Friends,

In this section, we will talk about practical implementation of Inheritance. Inheritance basically explains IS-A relationship. We will see the same in a moment. Below, I have created simple Doctor class which inherits from DoctorInfo.

Now, the 1st thing which I would like to do with this class is to create a constructor as shown below. 3rd Continue reading “Practical Inheritance” »

950 total views, no views today

Inheritance in JavaScript using Prototype

Hi Friends,

In this section, we are going to discuss Inheritance in Javascript. Inheritance is one of the OOPs methodology. But, here we will implementing the same in JavaScript.

Therefore, in the above snippet, I have simply created one simple Parent Class and Child class with one properties and methods to it. Also note that both these two methods takes one dynamic argument and get returned with some concatenated expression, fairly simple. Now, we need to make child class inherit parent class properties using Prototype property.

Continue reading “Inheritance in JavaScript using Prototype” »

1,431 total views, no views today

Why Angular 2.0?

Hi Friends,

In this section, we’ll talk about Angular’s upcoming version Angular2. We will discuss major changes around Angular 2 and what to expect from this version.

Angular is currently the most popular off-course. The Angular team devised a way to allow projects to run both Angular 1.X and 2.0 code at the same time. Upgrading could now be a gradual process. In my view, this saved the framework from almost certain stagnation and the horror of thousands of challenging to maintain, legacy code bases.

Continue reading “Why Angular 2.0?” »

3,813 total views, 2 views today

Git Cheat Sheet

Hi Friends,

In today’s section, I thought to share GIT Cheat sheet. I spend a lot of time using Git these days. It’s one of those technologies you should know. I use this to share my snippets, projects mainly.

Git is ideal offline source control solution.

Download Link:- github-git-cheat-sheet

Rahul Sahay
Happy Coding

782 total views, no views today