0
Which type of polymorphism is nothing but the method overloading in java?
Java
2 odpowiedzi
+ 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.
+ 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.