Easy learning with example program codes

difference between array and arraylist in java?

Array objects are of fixed length.ArrayList objects are of variable length.
Array does not support generics.ArrayList supports generics.
Array can store both primitive types as well as reference types.ArrayList can store only reference types.
Length of the Array is provided by the length variable.Length of the ArrayList is provided by the size() method
Please follow and like us:

Copyright © 2020 CodesJava Protection Status