Talking about Java generic wildcards solves many criticisms of generics (such as not overloading)

Generic:

Generic methods cannot be overloaded because they are the same after being erased, that is, if the formal parameters in a method are generic, the method cannot be overloaded, that is, even if the method name is the same and the parameters are different, but ordinary methods can be overloaded (with different parameters of the same name)

The HTML was originally intended to be transferred to XML, and there was an XHTML in the middle, but the migration has not been successful for 10 years. As a result, the HTML was upgraded to HTML5. Finally, the migration failed. Let's use HTML.

In fact, in jdk1 Adding generics after 5 can be checked in the compiler, but it also introduces many criticisms. In fact, generics have been wiped out after compilation, that is, the Java virtual machine does not know generics.

The above is what Xiaobian brought to you. Talking about Java generic wildcards solves all the contents of many criticisms of generics (such as not overloading). I hope it will help you and support programming tips~

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>