-6

I am not able to make the difference between ArrayList and Array of objects in java. I am just a beginner. Also I am not able to understand that why Array is sorted by Arrays.sort and ArrayList is sorted by Collections.sort if both are array only.

Patel Parth
  • 315
  • 5
  • 16

1 Answers1

2

The short answer is arrays have a set size you define where as an arraylist has infinite size. You'll learn a lot about them from the api

https://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Array.html

https://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html

Zach
  • 640
  • 1
  • 8
  • 20