What is Method Overloading in Java || Understand Polymorphism with example

preview_player
Показать описание
This tutorial covers the first type of polymorphism in java which is called method overloading(Static polymorphism). Throughout this entire tutorial, we will learn the meaning of polymorphism and how can we achieve that by using method overloading by a working example.

If we talk about oops concepts in java there are 4 major things :

1.Encapsulation
2.Polymorphism
3.Abstraction
4Inheritance

Polymorphism
===========

The concept of defining multiple functionalities with the same name with respect to a single object is known as polymorphism.
There are two types of polymorphism in java and they are

1.Static polymorphism 2. Dynamic polymorphism

We can achieve static polymorphism in java by using method overloading and we can achieve dynamic polymorphism by using method overriding.

method overloading in java
=======================
The concept of defining multiple methods with the same name,same number of parameters or different number of parameters is called method overloading.

If the no of parameters is same, the datatype of the parameters must be different with respect to a single object.

Among multiple methods based on the no of parameters and type of the parameters, the corresponding method will be executed.

So let's understand what is method overloading in java with a full working example.

=============
Please subscribe to my channel by clicking on the link below.

Stay tuned and like my Facebook page for more.

Music :
-----------
credits : -

Creative Commons — Attribution 3.0 Unported— CC BY 3.0

-----

intro template :
Рекомендации по теме
Комментарии
Автор

this guy explains better than my computer sir
Thanks it helped me

lakshminarayanc
Автор

Great explanation friend today my thumps up button has some value 👨‍💻👑

sivakys
Автор

Today is my exam and I have understand method overloading thank u bhaiya🙏👍👍

karan_content
Автор

God is one, but he has many forms !! haha I liked it example :) Keep it up buddy! You are doing great job

prasadsardesai
Автор

Bro ur way of explaning is perfect, but now were is the next part of this video?? is it yet to be cmpltd or not yet started?? can we get that video Asap..!

gauravrane
Автор

can u make a video on difference between a function and a method ?

lakshminarayanc
Автор

Please explain the difference between encapsulation and abstraction

ramyak
Автор

Hai, Avi which one is the next video after this. I didn't get.

jyotshnamanjari
Автор

What if write int demo(){ //stmts....} ????

durgashete
Автор

One question if we have 2 overloaded method eg show(String s); show (Object o); and I am invoking show(null); which method will get invoked plz answer

vaibhavgondralwar
Автор

Hi Abhishek, ,You Follow Gurumann Right 08:30, Background Score

akulabhaskar