0

Which type of polymorphism is nothing but the method overloading in java?

Java

20th Oct 2017, 6:15 AM
Vandy Sharma
Vandy Sharma - avatar
2 Antworten
+ 3
overloading and polymorphism are different. polymorphism depends on keeping the signature of a method. Overloading means different signatures for one method. maybe operator overloading and polymorphism are nearby.
20th Oct 2017, 6:37 AM
Oma Falk
Oma Falk - avatar
+ 1
I think you are reffering to "static polymorphism" also know as "compile-time polymorphism". . . . This refers to polymorphism which is resolved at compile time already and an example of static polymorphism would be "method overloading". This is where you are able to use the same method signature for different uses(e.g A user defined "run" method versus the "run" method in the Thread class) and the compiler decides which is the correct method based on object type.
20th Oct 2017, 7:24 AM
Ridhaa Cupido