Ask Question

Create a Word document or text file named Part3 that contains answers to the following:

1. Consider the declaration in SumAllArr. java: int[] arr1 = new int[max + 1];

a. How many array elements does this statement create?

b. Why do we have max + 1?

c. Can we just use max and have the program still work correctly?

2. Before the while-loop in SumAllArr. java we have i = 1.

a. Why is it there?

b. Can we use another variable instead?

3. The do-while loop in SumAllArr. java is implemented using (++i < = max).

a. Provide an alternative expression that implements the same logic.

b. What will (i+ + < = max) result in?

+1
Answers (1)
  1. Today, 20:03
    0
    11111
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Create a Word document or text file named Part3 that contains answers to the following: 1. Consider the declaration in SumAllArr. java: ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers