Static polymorphism in Java with example || Compile time polymorphism in Java [MOST IMP CONCEPT]

Описание к видео Static polymorphism in Java with example || Compile time polymorphism in Java [MOST IMP CONCEPT]

In this video we have discussed about Static polymorphism in Java in detail

Udemy Course of Code Decode on Microservice k8s AWS CICD link:
https://openinapp.co/udemycourse

Course Description Video :
https://yt.openinapp.co/dmjvd

Ability of an object to take
Many forms. Any object in java that passes IS-A test is polymorphic and since all objects extends Object class hence all object are polymorphic.
E.G.
Frog
Since a frog can behave as
An animal too,
As Terrestrial animal too
And as an aquatic animal too, Hence Frog is Polymorphic object.

Methods having same names but different Parameters is method overloading or static polymorphism. Eg
Add(a,b) and Add(a,b,c)
Both methods add all arguments

Imp**
Overloading / static polymorphism is not possible by changing the return type only. It gives compile time error due to ambiguity.
This video contains static polymorphism example with live demo



The word ‘polymorphism’ literally means ‘a state of having many shapes’ or ‘the capacity to take on different forms’. When applied to object-oriented programming languages like Java, it describes a language’s ability to process objects of various types and classes through a single, uniform interface.

Polymorphism in Java has two types: Compile time polymorphism (static binding) and Runtime polymorphism (dynamic binding). Method overloading is an example of static polymorphism, while method overriding is an example of dynamic polymorphism.


Static Polymorphism in Java,
Static polymorphism,
Java Static polymorphism,
compile time polymorphism in java,
compile time polymorphism,
compile time polymorphism and runtime polymorphism,
difference between compile time polymorphism and runtime polymorphism,
Polymorphism in Java,static and dynamic polymorphism in java

#staticpolymorphism #polymorphism #compiletimepolymorphism

Комментарии

Информация по комментариям в разработке