A collection of elements, each of the same type, but normally corresponding to unique values. Used often in computer science, compare with set and tuple. Also see hash, queue and stack.

In Java, an array is a collection of values of the same type stored in contiguous order memory locations, each of which can be accessed by an integer index. Class Java.lang.reflect.Array.

API (JDK 1.1) documentation: http://java.sun.com/products/jdk/1.1/docs/api/java.lang.reflect.Array.html.


In computer science, probably the simplest and most commonly used data-structure is the one-dimensional array. A one-dimensional array can be conceptualised as a simple list of values arranged in order in memory, such as this -

1 2 7 6 3 34 2 87

When accessing values from the array, it is usual to provide a) the variable name of the array (one of the main advantages of an array is to allow you to access multiple values from the same variable name, allowing you to group data together) and b) the memory offset from the start of the array. The first value is usually accessed by providing the offset 0, because this will read from the first block of memory (the offset 1 will read the second value, because it will move inwards 1 block).


Things get a bit more complicated with arrays that have more than one dimension, which can be conceptualised as tables, like this -
 | 0  1
0| 1 34
1| 2 12
2| 5 37
The rows are usually referred to as the records, and the columns are the fields. To access this array, you need to supply two offsets, as well as the variable name - an offset for the record, and one for the field. So, the offset 1,2 would access the value 37. Most databases are essentially two-dimensional arrays, which is what you see above in the table.

Things get really complicated with three or four dimensional arrays, which are hard to conceptualise. You can imagine a three dimensional array to be a cube of values, and if anyone can conceptualise a four-dimensional one, I'd like to know.

Three dimensional arrays are used in graphics programs to store 3D co-ordinates, but anything above that is usually of little use to the programmer.

Ar*ray" (#), n. [OE. arai, arrai, OF. arrai, arrei, arroi, order, arrangement, dress, F. arroi; a (L. ad) + OF. rai, rei, roi, order, arrangement, fr. G. or Scand.; cf. Goth. raidjan, garaidjan, to arrange, MHG. gereiten, Icel. rei[eth]i rigging, harness; akin to E. ready. Cf. Ready, Greith, Curry.]


Order; a regular and imposing arrangement; disposition in regular lines; hence, order of battle; as, drawn up in battle array.

Wedged together in the closest array. Gibbon.


The whole body of persons thus placed in order; an orderly collection; hence, a body of soldiers.

A gallant array of nobles and cavaliers. Prescott.


An imposing series of things.

Their long array of sapphire and of gold. Byron.


Dress; garments disposed in order upon the person; rich or beautiful apparel.


5. Law (a)

A ranking or setting forth in order, by the proper officer, of a jury as impaneled in a cause.


The panel itself.


The whole body of jurors summoned to attend the court.

To challenge the array Law, to except to the whole panel. Cowell. Tomlins. Blount. -- Commission of array Eng. Hist., a commission given by the prince to officers in every county, to muster and array the inhabitants, or see them in a condition for war. Blackstone.


© Webster 1913.

Ar*ray", v. t. [imp. & p. p. Arrayed (#); p. pr. & vb. n. Arraying.] [OE. araien, arraien, fr. OE. arraier, arreier, arreer, arroier, fr. arrai. See Array, n.]


To place or dispose in order, as troops for battle; to marshal.

By torch and trumpet fast arrayed, Each horseman drew his battle blade. Campbell.

These doubts will be arrayed before their minds. Farrar.


To deck or dress; to adorn with dress; to cloth to envelop; -- applied esp. to dress of a splendid kind.

Pharaoh . . . arrayed him in vestures of fine linen. Gen. xli..

In gelid caves with horrid gloom arrayed. Trumbull.

3. Law

To set in order, as a jury, for the trial of a cause; that is, to call them man by man.


To array a panel, to set forth in order the men that are impaneled.

Cowell. Tomlins.

Syn. -- To draw up; arrange; dispose; set in order.


© Webster 1913.

Log in or registerto write something here or to contact authors.