Exam 20: Generics

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

The ________ clause specifies the type constraint for type parameter T.

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

C

Which statement is false

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

B

Generic methods can be overloaded by non-generic methods that have the same method name and the same or different number of method parameters.

Free
(True/False)
4.9/5
(33)
Correct Answer:
Verified

True

Generics make writing a program more __________.

(Multiple Choice)
4.8/5
(44)

When a method is called,the compiler tries to find a method that matches the _________ of the method call.

(Multiple Choice)
4.9/5
(34)

It's not possible to apply multiple constraints to a type parameter.

(True/False)
4.9/5
(37)

A generic method can be overloaded by ________ method.

(Multiple Choice)
4.9/5
(35)

Generic methods are often used to perform similar operations on different types of data.

(True/False)
4.9/5
(26)

When the compiler encounters a method call,it attempts to locate a method declaration that has the same signature as the method call.

(True/False)
4.8/5
(41)

Generics provide __________ that allows the compiler to catch invalid types.

(Multiple Choice)
4.9/5
(31)

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

(Multiple Choice)
4.7/5
(32)

Generic methods can not be overloaded.

(True/False)
4.7/5
(34)

A generic method's body is declared differently than that of any other method.

(True/False)
4.9/5
(38)

You can use explicit type arguments to indicate the exact type that should be used to call a generic method (e.g.,< int >).

(True/False)
4.8/5
(38)

If there's a constructor constraint,the type argument's class must not provide constructors.

(True/False)
4.8/5
(33)

IComparable objects cannot,by default,be used with generic code.

(True/False)
4.9/5
(31)

A ________ provides a means for describing a class in a type-independent manner.

(Multiple Choice)
4.9/5
(30)

The type constraints determine the operations that can be performed on the type parameters.

(True/False)
4.9/5
(35)

__________ enable you to specify,with a single class declaration,a set of related classes.

(Multiple Choice)
4.8/5
(35)

A class can provide two or more generic methods that specify the same method name but with different number of method parameters and/or type parameters.

(True/False)
4.8/5
(28)
Showing 1 - 20 of 22
close modal

Filters

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