Why are Java generic type parameters not implemented at run time?

My understanding is that C # and Java differ in some aspects in terms of generics. One of them is that generic type parameters are in C #/ Net, but not in Java Why do java language designers do this?

Solution

Allows binary compatible pre - Generic bytecode, thus allowing new code to interface with old code

Start with the type error page of the Java tutorials:

For related questions, see c# vs Java genetics

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
分享
二维码
< <上一篇
下一篇>>