Skip to content

Commit b966a37

Browse files
committed
Added Done
Signed-off-by: Someshdiwan <[email protected]>
1 parent ecdd5ce commit b966a37

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Section11ObjectOrientedProgramming/src/Polymorphism.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ The term polymorphism comes from Greek, where "poly" means "many" and "morph" me
55
polymorphism allows different classes to be treated as instances of the same class through inheritance, while allowing
66
for different behaviors depending on the specific class type that is being referenced.
77

8+
Method overloading is an example of compile-time (static) polymorphism in Java.
9+
10+
It allows a class to have multiple methods with the same name but different parameters.
11+
12+
The compiler determines which method to call based on the number, types, and order of arguments at compile-time.
13+
14+
This provides flexibility in method invocation and improves code readability.
815

916
What is Polymorphism?
1017

0 commit comments

Comments
 (0)