Compare and contrast vectors and arrays.
What will be an ideal response?
Vectors have many built in features that help track the number of elements as well as
provide memory management capabilities. A corresponding array structure would require you to
write much of your own code to accomplish the same tasks. The biggest advantage of vectors over
arrays is the capability to increase and decrease size as necessary. Arrays have a fixed size.
Arrays do not carry the restrictions on base type that vectors impose. The base type of an array can
be of any type; the base type of a Vector is always of type Object. Therefore, storing primitive
values requires a little more work because the appropriate wrapper class needs to be used.
You might also like to view...
Briefly explain why you might choose Simple Markup view over All Markup view when editing a shared document?
What will be an ideal response?
Both near-end crosstalk (NEXT) and far-end crosstalk (FEXT) are measured in __________.
A. Ohms B. Amps C. Hertz D. decibels