**** DO NOT JUST COPY AND PASTE, THOSE ANSWERS DON'TWORK!!!!****Modify the existing ArrayLists's contents, byerasing the second element, then inserting 100 and 102 in the shownlocations. Use ArrayList's remove() and add() only. SampleArrayList content of below program:
import java.util.ArrayList;
public class ArrayListADT {
public static void main (String [] args) { ArrayList<Integer> numsList = newArrayList<Integer>(); int numOfElem = 4;
numsList.add(101); numsList.add(200); numsList.add(103);
/* Your solution goes here */
}}
**** DO NOT JUST COPY AND PASTE, THOSE ANSWERS DON'T WORK!!!!****Modify the existing ArrayLists's contents, by erasing t
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am