Question: Simple Java question - Answer the following questions about a one-dimensional array 1. Declare a integer constant called MY_SIZE with a value of 10 2.
Simple Java question -
Answer the following questions about a one-dimensional array
1. Declare a integer constant called MY_SIZE with a value of 10
2. Declare and create a one-dimensional called myArray with MY_SIZE elements where each element is a double
3. Print the 4th element
4. Write a counter-controlled for loop to print all of the elements (one per line)
5. Write an enhanced for loop to print all of the elements (one per line)
--------------------------------------------------------------------------------------------------------------------
Answer the following questions about a two by three integer array named scores
1. Write a statement that declares and creates the array
2. How many rows does it have?
3. How many Columns does it have?
4. Write a code snippet that will add 1 to each element in the array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
