can we use array list in palce of array ,or is there any specific rule about what to use array or array list,because it will much easier to use a array list
Array list concept
arrays are a bit faster than arraylist, but this speed comes with a price, i.e you need to know in advance about the size while creating an array. But Arraylist are dynamic arrays, meaning if you dont know about how many elements are going to be there in the collection, then its better to use arraylist.
Thanks.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.