Topic 12 - List ADT Flashcards
1
Q
Can an interface implement another interface? Extended another interface?
A
No. Yes.
2
Q
Is multiple inheritance legal? Ie. a class extends two classes? can an interface extend multiple interfaces?
A
No. Yes.
3
Q
Can a class implement two or more interfaces?
A
Yes.
4
Q
What type of list collections are there?
A
1) Ordered lists
2) Unordered lists
3) Indexed lists
5
Q
The Comparable Interface: How do we implement this part?
A
Declare a variable that is of type Comparable
Cast the variable of type T to the variable type Comparable:
“Comparable tempt = (Comparable)element;”