Respuesta :
Answer:
- salarySteps[0] = 30000;
- salarySteps[4] = 160000;
- a[k] = 15;
- a[j] = a[j+1] * 2;
Explanation:
In the first statement, salarySteps is an ArrayList. Total elements in the list are 5. To assign the value 30000 to first element of the array, 0 is the index which is the position of that array element as the array starts from 0 index. 0 points to the starting element of the array salarySteps.
In the second statement 160000 is assigned to the last element of the array names salarySteps. As the total elements are 5, so the array index starts from 0 to 4. As the value is to be assigned to the last element of array list so this means that the index is 4.
In the third statement the the name of the Array list is a and it has 12 elements. The k-th element of this array list has to be assigned the value of 15. So the statement is a[k] = 15 where k is the index and 15 is the value assigned to the k-th index of array list a.
In the fourth statement new value is to be assigned to the element of array list a which has an index j. The new value should be equal to twice the value in the next element of array list. This next value is pointed by the index j+1. So the statement is a[j] = a[j+1] * 2; where a is the array list j is the index of the array element which is equal to twice the value (multiplied by 2) stored in the next element to the index position j i.e. j+1.