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.8/5
(29)
Correct Answer:
Verified

B

__________ is the default upper bound of a type parameter.

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

D

Which of the following statements is false?

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

C

Which of the following statements is true?

(Multiple Choice)
5.0/5
(18)

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

(Multiple Choice)
4.9/5
(36)

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

(Multiple Choice)
4.7/5
(31)

Which statement is false?

(Multiple Choice)
4.8/5
(33)

Which statement is false?

(Multiple Choice)
4.9/5
(35)

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

(Multiple Choice)
4.8/5
(35)

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

(Multiple Choice)
4.9/5
(37)

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

(Multiple Choice)
4.9/5
(32)

One generic Stack class could be the basis for creating many Stack classes,e.g.,Stack<Double>,Stack<Integer> and Stack<Employee>.These classes are known as __________.

(Multiple Choice)
4.9/5
(30)

Class Number is ________ of both Integer and Double.

(Multiple Choice)
4.9/5
(42)

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

(Multiple Choice)
4.9/5
(38)

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

(Multiple Choice)
5.0/5
(37)
close modal

Filters

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