C# vs Java - Generic Lists

后端 未结 2 819
南旧
南旧 2021-01-11 17:35

What are the differences of the C# and Java implementations of the generic List class?

2条回答
  •  误落风尘
    2021-01-11 18:09

    Are you asking for differences in their API or their underlying implementation? I believe Java generics are implemented completely via the compiler -- the JVM has no notion of generics. For C#, generics are a built-in concept of the .Net runtime. Wikipedia seems to have a good comparison of the two: http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java#Generics

提交回复
热议问题