-2

I've played around with arrays and arrayLists. Sorting is a breeze with arrayLists but I can not say the same with arrays. You have to make a for loop and filter the results and it's a pain. As far as I can see arrayList are just a better version of arrays. So why use arrays? Is there something they can do better.

2
  • 3
    Take a look at this Commented Nov 23, 2014 at 1:31
  • Oops didn't see that! Commented Nov 23, 2014 at 1:32

1 Answer 1

0

Sorting with arrays and ArrayLists is equally easy: there are already implementations for sorting both of them:

The reasons for using one of the other are more of memory concerns, speed concerns or because your problems is better suited to be solved with one or the other.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.