Austin Trower wrote:
It does not appear to have any effect
Unless I'm missing something, it looks like all you did is add an ArrayList. You don't seem to be using it, and you don't seem to have actually replaced anything.
what I need is to replace the Array with an ArrayList and I need to do it withtout changing the "Test" portion of my code further If I make the adjustment here I then will have to adjust things in the Course section and change my private String [] students to ArrayList <String> list but I need the same output as if I just used the Array.
You need to get your requirements straight. On the one hand, you're saying "replace array with ArrayList", which suggests that everything that exposes that array publicly will also need to change to ArrayList. Then on the other hand you say, "but don't change anything that uses the array."
So you need to decide whether you're going to change, for example,
to
, or if you're going to leave that as it is, but then have its body construct an array from your internal List and return that.