Flashcards in Chapter 20 Review Deck (14):
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.
All generic method declarations have a type-parameter section that immediately precedes the method name
False. The method type-parameter precedes the return type
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.
Type-parameter names among different generic methods must be unique.
The scope of a generic class's type parameter is the entire class except its static members
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
A type-parameter is delimited by what characters?
<> angle brackets
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.
If a generic class in instantiated and no type is specified. What default type is used?
What comes before the type-parameter in a generic class definition?
The syntax _____________ specifies that the upper bound of a wildcard is type T?
? extends T
The upper bound class in a hierarchy defines the super class for which all classes within the domain are subs
The lower bound class in a hierarchy defines the sub class for which all classes in the domain are a super-class.