简体   繁体   English

java中的参数多态性

[英]Parametric Polymorphism in java

什么是java中的参数多态

For a good introductory description of parametric polymorphism, refer to this Wikipedia page . 有关参数多态性的详细介绍性说明,请参阅此Wikipedia页面

In Java, generics are a form of parametric polymorphism. 在Java中,泛型是参数多态的一种形式。

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. 通常这些方法具有相同的目的,因此您可以使用不同的(多形式)方法来调用相同的名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM