Examveda

What is the purpose of the `extends` keyword in Java generics?

A. It specifies an exception type

B. It indicates the superclass of a class

C. It restricts the generic type to be a subclass or the same as the specified type

D. It has no meaning in generics

Answer: Option C


This Question Belongs to Java Program >> Generics In Java

Join The Discussion

Related Questions on Generics in Java