Arrays
An array is simplest way to store data. It stores data in simple list of objects.
An array cannot grow in length after being created. One has specify length of array upfront and length cannot be changed after creation.
Searching a object in array is fast if you know index but slow otherwise.
For example,
It is fast to retrieve 12th object in array but slow to find object named "Rock"
Loop through array to find that object
No comments:
Post a Comment