Easy learning with example program codes

difference between array and arraylist in java?

Array ArrayList
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
Sign Up/ Sign In
Ask a Question

Copyright © 2018 CodesJava Protection Status SiteMap Reference: Java Wiki