Westonci.ca is the ultimate Q&A platform, offering detailed and reliable answers from a knowledgeable community. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

Briefly explain what an array is. As part of your answer make use of a labelled example to show the declaration and components of an array

Sagot :

Answer:

Explanation:

In programming an array is simply a grouping of various pieces of data. Various data elements are grouped together into a single set and saved into a variable. This variable can be called which would return the entire set which includes all of the elements. The variable can also be used to access individual elements within the set. In Java an example would be the following...

int[] myArray = {33, 64, 73, 11, 13};

In Java, int[] indicates that the variable will hold an array of integers. myArray is the name of the variable which can be called to access the array elements. The elements themselves (various pieces of data) are located within the brackets {}