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

9

1 Answer 1

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

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.