Home » JAVA Programming » Generics » Question
  1. What are generic methods?
    1. Generic methods are methods that introduce their own type parameters
    2. Generic methods are the methods defined in a generic class
    3. Generic methods are methods that take void parameters
    4. Generic methods are the methods that extend generic class methods
    5. None of these
Correct Option: A

Generic methods are methods that introduce their own type parameters. This is similar to declaring a generic type, but the type parameter scope is limited to the method where it is declared. Static and non-static generic methods are allowed, as well as generic class constructors.



Your comments will be displayed only after manual approval.