Week 13 Flashcards
1
Q
This enables the programmer to create a single class, interface, and method which can be used by different types of objects
A
Generics
2
Q
Do primitive types work with generics? Why?
A
No. They cannot be directly converted to an object.
3
Q
The binary search tree class can be used with any class that implements the comparable interface. Is this generic through inheritance or type parameters?
A
Inheritance (“implements”)