Discover the answers you need at Westonci.ca, where experts provide clear and concise information on various topics. Join our Q&A platform and connect with professionals ready to provide precise answers to your questions in various areas. Join our platform to connect with experts ready to provide precise answers to your questions in different areas.

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