There are some major difference between array and array list though both array and array list are use to store elements
In one word , Array is a limited size and can save similar data typed elements and
Array List is a dynamically representation of Array, Array List are Stores object only and resizable.
you can't change the size of array, but array list can re-size itself when need.
Difference :
Array is the collection of values of same data type
1. the variables in an array is called array elements : Instead of declaring individual variables
2. Every array is the reference type of data type.
Array list is a class which store only objects and it is resizable
ArrayList AR= new ArrayList();
The methods of array list classes are
1) Add
2) Remove
3) Clear
4) Insert
5) TrimToSize
6) Reverse
7) Sort
In one word , Array is a limited size and can save similar data typed elements and
Array List is a dynamically representation of Array, Array List are Stores object only and resizable.
you can't change the size of array, but array list can re-size itself when need.
Difference :
Array is the collection of values of same data type
1. the variables in an array is called array elements : Instead of declaring individual variables
2. Every array is the reference type of data type.
Array list is a class which store only objects and it is resizable
ArrayList AR= new ArrayList();
The methods of array list classes are
1) Add
2) Remove
3) Clear
4) Insert
5) TrimToSize
6) Reverse
7) Sort
0 comments:
Post a Comment