Solved

Assume an Array-Based List Implemented by a Class That Uses

Question 11

Multiple Choice

Assume an array-based list implemented by a class that uses the fields
String [ ] list;
Int nElements;
To represent the array of elements,and the number of elements currently stored.Assuming there is space
In the internal array,the code for adding a new item str to the end of the list is


A) list.add(str) ;
B) list[nElements] = str;
C) list[nElements] = str;nElements++;
D) nElements ++;list[nElements] = str;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions