Exam 21: Generic Classes and Methods

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Suppose Stack is a generic class that has one type parameter.The following assignment Stack< Integer > integerStack = new Stack( 10 ); Is __________.

Free
(Multiple Choice)
4.9/5
(40)
Correct Answer:
Verified

C

All generic method declarations have a type parameter section delimited by __________.

Free
(Multiple Choice)
4.9/5
(37)
Correct Answer:
Verified

B

When compiling a generic class,the __________ option should be used to view the unchecked warning message.

Free
(Multiple Choice)
4.8/5
(40)
Correct Answer:
Verified

A

Which statement is false?

(Multiple Choice)
4.7/5
(33)

__________ enable programmers to specify,with a single method declaration,a set of related methods.

(Multiple Choice)
4.8/5
(41)

Which statement is false?

(Multiple Choice)
4.9/5
(40)

__________ is the default upper bound of a type parameter.

(Multiple Choice)
4.9/5
(35)

Which statement is false?

(Multiple Choice)
4.8/5
(38)

Which statement is false?

(Multiple Choice)
4.8/5
(37)

When a generic class is instantiated without specifying a type argument,it is said to have a __________.

(Multiple Choice)
4.9/5
(35)

Generics provide __________ that allows programmers to catch invalid types at compile time.

(Multiple Choice)
5.0/5
(39)

When the compiler translates a generic method into Java bytecodes,it uses __________ to replace the type parameters with actual types.

(Multiple Choice)
4.8/5
(34)

A wildcard type argument is denoted by a(n)__________.

(Multiple Choice)
4.9/5
(36)
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)