In order to create an array with generic type E, you need to use following statement Select one: a. E[] data = (E[])new Object[INITIAL_CAPACITY]; b. E[] data = new E[INITIAL_CAPACITY]; c. E[] data = (E[I)new Object(INITIAL_CAPACITY); %3D d. E[] data = new E(INITIAL_CAPACITY);

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 29SA
icon
Related questions
Question

help

In order to create an array with generic type E, you need to use following statement
Select one:
O a. E[] data = (E[])new Object[INITIAL_CAPACITY];
O b. E[] data = new E[INITIAL_CAPACITY];
c. E[] data = (E[1)new Object(INITIAL_CAPACITY);
d. E] data = new E(INITIAL_CAPACITY);
Transcribed Image Text:In order to create an array with generic type E, you need to use following statement Select one: O a. E[] data = (E[])new Object[INITIAL_CAPACITY]; O b. E[] data = new E[INITIAL_CAPACITY]; c. E[] data = (E[1)new Object(INITIAL_CAPACITY); d. E] data = new E(INITIAL_CAPACITY);
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Hyperlinks
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning