Difference between Enumeration<? extends ZipEntry> and Enumeration?

后端 未结 3 1435
青春惊慌失措
青春惊慌失措 2021-01-02 06:19

Is there a difference between Enumeration and Enumeration? If so, what is the difference?

3条回答
  •  温柔的废话
    2021-01-02 06:52

    Now you've just gone and reminded me of something I wish we had over in the C# world.

    Other than the links provided, there's some good links about C# and Java in relation to this topic in the answers to this question: Logic and its application to Collections.Generic and inheritance

    A selection of which are:

    • Contravariance and Covariance in C# (code is C# specific, and theoretical since the syntax doesn't exist [yet], but covers the topics in general very well.)
    • Java generics and the covariance and contravariance of arguments
    • Java generics tutorial from Sun.

提交回复
热议问题