Chapter 20 Review Flashcards Preview

COP_3252 > Chapter 20 Review > Flashcards

Flashcards in Chapter 20 Review Deck (14):
1

T or F
A generic and non-generic method can have the same method name

True. A generic method can be overloaded by a non-generic method of the same name.

2

All generic method declarations have a type-parameter section that immediately precedes the method name

False. The method type-parameter precedes the return type

3

A generic method can be declared only once in the type-parameter section but can appear more than once in the method's parameter list.

True

4

Type-parameter names among different generic methods must be unique.

False.

5

The scope of a generic class's type parameter is the entire class except its static members

True

6

What do generic methods and classes do?

Generics allow you to specify a single method or class to perform a function or related function on different types of data

7

A type-parameter is delimited by what characters?

<> angle brackets

8

A generic method's ______ can be used to specify the method's argument types, to specify the method's return type and to declare variables within the method.

type parameter

9

If a generic class in instantiated and no type is specified. What default type is used?

Raw Type

10

What comes before the type-parameter in a generic class definition?

class name

11

The syntax _____________ specifies that the upper bound of a wildcard is type T?

? extends T

12

Upperbound

The upper bound class in a hierarchy defines the super class for which all classes within the domain are subs

13

Lowerbound

The lower bound class in a hierarchy defines the sub class for which all classes in the domain are a super-class.

14

Wildcard

A wildcard "?" is used in conjunction with the keyword 'super' or 'extends' to define an upper or lower bound domain.