A good answer might be:

array     = new int[ size ];  
The programmer does not need to say how many elements the array has. The user picks the size when the program runs. The array constructor creates the array after the user has specified how large the array is to be.

Minimum and Maximum

A collection of integers will have an integer that is the largest in the collection. This is usually called the maximum value. The maximum may occur several times; but no other integer in the list is larger. For example, in the following:

2, 9, 23, -19, 23, 17, -45, 0
the integer 23 is the maximum. If you were to plot these integers on a number line, 23 would be the one most to the right:
           -45             -19         0 2  9    17  23
            x               x          x x  x    x   x
+--|--+--|--+--|--+--|--+--|--+--|--+--|--+--|--+--|--+--|--+--|--+--|--+--|--+-->
  -60   -50   -40   -30   -20   -10    0     10    20    30    40    50    60

Similarly, a collection of integers will have an integer that is the smallest in the collection. This is usually called the minimum value in the list. The minimum may occur several times. In the above collection, the minimum is -45. On the number line, the minimum is the integer most to the left.

QUESTION 7:

Examine the following collection of integers:

-20, 19, 1, 5, -1, 27, 19, 5
  1. What is the maximum of the collection?
  2. How did you figure this out?

Click Here after you have answered the question