6.3 Suppose we have the following code:
ArrayList myList = new ArrayList();
myList.add ("Karen");
myList.add ("Don");
myList.add ("Mark");
ArrayList temp = new ArrayList (myList);
ArrayList sameList = myList;
myList.add (1, "Courtney");
Hypothesize what the contents of myList, temp, and sameList will be after this last insertion. Then test your hypothesis with a main method that includes the code.
 
 
View Solution
 
 
 
<< Back Next >>