Answer:
A. int [ ] numbers = new int[employeeNumbers];
B. double[ ] numbers = new double[payRates];
C. float[ ] miles = new float[14];
D. char[ ] letters = new char[1000];
7.2 Size of array cannot be negative
Size of array should be a positive integer and not decimal.
7.4 The size declarator is used in a definition of an array to indicate the number of elements the array will have. A subscript is used to access a specific element in an array.
7.5 subscript to be out-of-bound means the specified integer is not within the range of the length of the array.
Step-by-step explanation:
The question has answer given for some. I guess the explanation is what is needed.
A. The general format of creating an array is:
data type[] arrayRefVar=new datatype[size];
In this case, the datatype is int, arrayRefVar is numbers, size is employeeNumbers. The size was already initialised to 100 (employeeNumber).
B. A wrong datatype was used.
double[ ] numbers = new double[payRates];
would create an array of size 25 which is the payRates with types double.
C. The array was re-written using the general format of creating an array is:
data type[] arrayRefVar=new datatype[size];
D. The array was correctly defined.