Question: Hi Please help with some task. Need to create four generic method with ArrayList: 1. A method that replaces the third element of the ArrayList
Hi
Please help with some task.
Need to create four generic<> method with ArrayList:
1. A method that replaces the third element of the ArrayList passed in the argument with another element (also passed in the argument).
2. A method that will increase the size of a given ArrayList by the specified value.
3. A method that will trim the capacity of the ArrayList to the number of elements it currently has.
4. A method that will clear the given ArrayList.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
