What is parametric polymorphism in jav开发者_运维知识库a
For a good introductory description of parametric polymorphism, refer to this Wikipedia page.
In Java, generics are a form of parametric polymorphism.
Sometimes, overloading is also reffered as parametric polymorphism as far as you would have methods with the same name but with different parameters. Usually those methods have the same purpose so you have different (polymorph) ways of calling the same name.
精彩评论