Saturday 17 January 2015

Features of arrays in Java

 Features of arrays in Java :

1. Stores similar data types.
2. Contiguous (continuous) memory is allocated for the elements.
3. All the elements can be accessed with their index numbers where the first element added gets by default 0 index and the second element gets 1 and so on.
4. Accessing elements with their index number is very fast (have greater performance).
5.Once array is created, its size is fixed. That is, at runtime its size cannot be changed (when the programmer would like to add some more elements which he did not expect at the time of array creation).
6. Java supports multi-dimensional arrays and Jagged (variable size) arrays. 

No comments:

Post a Comment