posted 8 years ago
Hi all, so I have to convert my ArrayBasics class into an ArrayListBasics class. Basically, I have to change everything from and Array to ArrayList. However, I have begun to get a little bit lost. I though I was understanding how to convert all of these arrays into array lists, but I have begun to get errors when checking to make sure that my code compiles. Right now, I am getting an error in my reverse method that says unexpected type, found variable, require value. If someone could help me work though some of the issues I am havng in converting my code, that would be great, because as of right now, I am honestly lost. Here is my original Array code:
and here is the code I have been working on converting. I believe some of the methods work, but I am at a loss for the merge method and what I am doing wrong in the reverse method. When I had cancelled out these methods to check to see if anything else was wrong, I also found that my min method was giving an out of bounds exception error. Im sorry, I am very confused. Here is my ArrayList code I am working on:
Do or do not, there is no try.