Discussion
What happens when an ArrayList exceeds its capacity - which of the following is true?
Answer: C
Capacity is an internal detail: when the backing array is full the list allocates a bigger one and copies, so add remains amortised constant time. Giving a sensible initial capacity avoids repeated copying, but the list is never limited by it.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development