Find the best solutions to your questions at Westonci.ca, the premier Q&A platform with a community of knowledgeable experts. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

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 {}