Chapter 9 Subprograms of Concepts of Programming Languages MCQ 24. ____ polymorp
ID: 3706109 • Letter: C
Question
Chapter 9 Subprograms of Concepts of Programming Languages MCQ
24. ____ polymorphism is provided by a subprogram that takes generic parameters that are used in type expressions that describe the types of the parameters of the subprogram.
A. ad-hoc
B. inheritance
C. parametric
D. abstract
E. general
25. Parametrically polymorphic subprograms are often called _____ subprograms.
A. ad-hoc
B. generic
C. inheritance
D. subtype
E. supertype
26. In Java 5.0, it supports for ____ types and methods to Java. The name of a(n) ___ class in Java 5.0 is specified by a name followed by one or more type variables delimited by pointed brackets.
A. ad-hoc
B. generic
C. inheritance
D. subtype
E. supertype
27. In Java, for generic class<T>, T is the ___ variable.
A. ad-hoc
B. type
C. polymorphic
D. first-class
E. primitive
28. In Java (versus C++), generic parameters must be classes—they cannot be ____ types.
A. free
B. subtype
C. polymorphic
D. generic
E. primitive
Explanation / Answer
24.
Parametric polymorphism is provided by a subprogram that takes generic parameters that are used in type expressions that describe the types of the parameters of the subprogram.
Option c
25.
Parametrically polymorphic subprograms are often called generic subprograms.
Option b
26.
In Java 5.0, it supports for Generic types and methods to Java. The name of a(n) Generic class in Java 5.0 is specified by a name followed by one or more type variables delimited by pointed brackets.
Option b
27.
In Java, for generic class<T>, T is the type variable.
Option b
28.
In Java (versus C++), generic parameters must be classes—they cannot be primitive types.
Option e