Nakul Patekar
Nakul Patekar

Reputation: 123

"Polymorphism applies to overriding, not to overloading"?

I just read this line in book "Sun Certified Java Programmer" (page number-158) by Kathy Sierra and Bert Bates who worked as Master trainer at "Sun microsystems":

Polymorphism applies to overriding, not to overloading.

But some other books and articles say overloading is also a form of polymorphism.. i'm confused.. Please help..

Upvotes: 5

Views: 684

Answers (1)

Sotirios Delimanolis
Sotirios Delimanolis

Reputation: 279880

Don't believe the other books. Late binding (wiki) (with overriden/inherited methods) is polymorphism. Static binding is what applies to overloading.

The two bolded expressions are concepts you should familiarize yourself with as soon as possible. There are a number of available resources. Maybe start here.

Upvotes: 5

Related Questions