• Home
  • Search Tags
  • About

generics

Topics related to generics:

Getting started with generics

Generics allow you to define placeholders for exact types in definitions for classes, interfaces and/or methods.

Possible subtopics:

  • Class (and structure) generics
  • Interface generics
  • Method generics
  • Constraints
  • Covariance and contravariance

Generics in Java

Type erasure limits reflection, though that is not JVM specific, for example Ceylon uses reified generics.

Existential type support is not necessarily supported by other languages in this form: Kotlin supports it through type projections.

Content on the page is taken from Stack Overflow Documentation

This site is NOT affiliated with Stack Overflow or any of the contributors. | Privacy Policy | Terms of Service