Exam 20: Generic Classes and Methods

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

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

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

B

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

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

A

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

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

B

Class Number is ________ of both Integer and Double.

(Multiple Choice)
4.9/5
(36)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(39)

__________ is the default upper bound of a type parameter.

(Multiple Choice)
4.8/5
(32)

Which of the following statements is true?

(Multiple Choice)
4.8/5
(42)

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

(Multiple Choice)
4.9/5
(35)

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
(35)

Which statement is false?

(Multiple Choice)
4.8/5
(39)

One generic Stack class could be the basis for creating many Stack classes,

(Multiple Choice)
4.8/5
(45)

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

(Multiple Choice)
4.7/5
(42)

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

(Multiple Choice)
4.8/5
(47)

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

(Multiple Choice)
4.8/5
(41)
close modal

Filters

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