xplain why inserting additional elements into an ArrayList object whose current size is less than its capacity is a relatively fast operation and why inserting additional elements into an ArrayList object whose current size is at its capacity is a relatively slow operation.
What will be an ideal response?
An ArrayList whose current size is less than its capacity has memory available. Inser- tions are fast because new memory does not need to be allocated. An ArrayList that is at its capacity must have its memory reallocated and the existing values copied into it
Computer Science & Information Technology
You might also like to view...
Use the _____ element to contain a table row
a. td b. tr c. table d. row
Computer Science & Information Technology
What ACL entry would eliminate the effect of the implicit deny?
A) permit traffic all B) permit ip any any C) permit all D) permit any
Computer Science & Information Technology