Generics Flashcards Preview

Java > Generics > Flashcards

Flashcards in Generics Deck (4)
Loading flashcards...

What are Generics in java?

It is a feature that allows us pass TYPES to methods, classes and interfaces.


What are the beneficts of generics?

1 - Remove the need for casting
2 - Get safer code with errors being spoted in compile time instead of runtime.


How is called the type passed between the diamonds?

Parametarized Type


What are Bounded Types?

Bounded types are used when we want to restrict which types may be passed to an interface, class or method