Answer:
Following are the statement to this question:
//using set and size in-built method
salarySteps.set(salarySteps.size()-1, 160000); //assign value at the last element of the list
Step-by-step explanation:
Description of the above can be described as follows:
- In the question, it is declared, that an array list "salarySteps", is defined, which contains five integer elements, in this array-list at the last we insert an integer value, which is "160000".
- In the above code, the array list "salarySteps" uses a set method, inside this method a size method is used, that inserts the value "160000" at the last element of the array list.