-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.

JGerulskis
  • 800
  • 2
  • 10
  • 24

1 Answers1

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.

Daniel
  • 21,933
  • 14
  • 72
  • 101