6.4 Hypothesize what will happen when the following code fragment is run, and then test your hypothesis: ArrayList original.add ("yes"); ArrayList System.out.println (copy.get (0)); Hint: This exercise illustrates why the copy constructor is superior to the clone() method. | |
| View Solution | |
| << Back | Next >> |