Javatpoint Logo

Why use ArrayList if requirement is not clear?

By: mali.g*** On: Wed May 31 10:01:54 IST 2017     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
Please provide some description for this question


This question may already have an answer here:
When to use LinkedList over ArrayList? 30 answers
That solved my problem! No, my question is different. I will edit to explain how.
I have found following question on www.javatpoint.com
If you were to use a List implementation,but not sure which one to, because the requirement is not yet clear. In this case which List implementation will you use ?
options: 1. ArrayList 2. LinkedList

Correct answer for this is ArrayList
But there is no explanation why, Please help me to uderstand
Same share on stackoverflow https://stackoverflow.com/questions/44275512/why-use-arraylist-if-requirement-is-not-clear
Up0Down
core java  x  328Tags

 
We can store only fixed size of elements in the array. It doesn't grow its size at runtime. To solve this problem, collection framework is used in java.

That means Arraylist is Growable in nature
Image Created0Down

By: [email protected] On: Wed May 31 11:29:23 IST 2017 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No