In the implementation of MyArrayList, which of the following are true?
A. size indicates the number of elements in the list.
B. capacity is the length of the array used to store the elements in the list.
C. capacity is always greater than size.
D. size is reduced by 1 if an element is deleted from the list.
E. capacity is reduced by 1 if an element is deleted from the list.
Answer: A, B, and D
Explanation: (C) is not correct because capacity may equal to size.
You might also like to view...
Answer the following statements true (T) or false (F)
1. When you call the setf function on an output stream, the effect is only until the next output. 2. Setting the width of output with call to the width member function, affects only the next output. 3. Setting the width of output with the manipulator setw is different from setting the width with the width member function. 4. If the output is too wide for the width specified in a setw manipulator or a call to the width member function, then the output is lost.
Write a JavaFX program to draw the five interlocking rings that are the symbol of the Olympics. The color of the rings, from left to right, is blue, yellow, black, green, and red.
Use setStroke(Color) to set the color of the line
What is the file name given to the Windows kernel?
A. Kern.sys B. Ntoskrnl.exe C. Hal.dll D. Winkernel.exe
A shape you can insert from an online library of ready-to-use three-dimensional graphics.
A. action graphic B. 3D model C. SmartArt graphic