0% found this document useful (0 votes)
38 views15 pages

Array PDF

An array is a collection of variables of the same type with indexes to uniquely identify each element. Arrays in Java have a length property that determines the maximum number of elements and elements are accessed using arrayName[index] syntax. Common array operations include accessing, searching, inserting, and deleting elements.

Uploaded by

Muhanad Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views15 pages

Array PDF

An array is a collection of variables of the same type with indexes to uniquely identify each element. Arrays in Java have a length property that determines the maximum number of elements and elements are accessed using arrayName[index] syntax. Common array operations include accessing, searching, inserting, and deleting elements.

Uploaded by

Muhanad Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Ibtisam A.

Dawoud
 An array is a sequenced collection of variables all
of the same type. Each variable, or cell, in an array
has an index, which uniquely refers to the value
stored in that cell. The cells of an array, A, are
numbered 0, 1, 2, and so on.
 Each value stored in an array is often called an
element of that array.
 Since the length of an array determines the maximum number
of things that can be stored in the array, we will sometimes
refer to the length of an array as its capacity.
 In Java, the length of an array named a can be accessed using
the syntax a.length. Thus, the cells of an array, a, are
numbered 0, 1, 2, and so on, up through a.length−1, and the
cell with index k can be accessed with syntax a[k].
elementType [] arrayName=new elementType[length]
■ Access

■ Searching

■ Inserting

■ Deleting

You might also like