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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Do primitive types work with generics? Why?

A

No. They cannot be directly converted to an object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly