Explore Westonci.ca, the premier Q&A site that helps you find precise answers to your questions, no matter the topic. Experience the convenience of getting reliable answers to your questions from a vast network of knowledgeable experts. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.
Sagot :
The declaration and initialization of arrays involves creating and using the arrays
How to declare an array?
Assume the programming language is Java.
To declare and initialize an array, we make use of:
- One dimensional array: Data-Type Array-name [] = {List of array values}
- Two dimensional array: Data-Type Array-name [] [] = {List of array values}
Assume the array name of the one dimensional array is num, and the data type is integer.
The following can be used to declare and initialize the array to have 5 elements
int num [] = {1,2,3,4,5}
Assume the array name of the two dimensional array is num, and the data type is integer.
The following can be used to declare and initialize the array to have 2 rows and 3 columns
int num [][] = {{1,2},{3,4},{5,6}}
Read more about arrays at:
https://brainly.com/question/22364342
Thank you for your visit. We're dedicated to helping you find the information you need, whenever you need it. Thank you for your visit. We're dedicated to helping you find the information you need, whenever you need it. We're here to help at Westonci.ca. Keep visiting for the best answers to your questions.