-
Which of these method can be used to increase the capacity of ArrayList object manually?
-
- increasecapacity()
- ensureCapacity()
- Capacity()
- increaseCapacity()
- None of these
Correct Option: B
When we add an element, the capacity of ArrayList object increases automatically, but we can increase it manually to specified length x by using function ensureCapacity(p);