I am writing a class that has an arrayList that holds objects as a data member and for one of the methods in this class I have to convert it into a basic array. To achieve this I created a new array and used the .toArray() method. Now at the end of this method I have to put it back into the original arrayList. It appears that array doesn't have a .toArrayList(). I'm just wondering what the most simple way to convert would be. Thanks for any help.
Edit: forgot to say what the arrayList was holding (objects)
Arrays.asList? You can then usenew ArrayList(Arrays.asList(...))oranInstanceOfList.addAll(Arrays.asList(...))depending on your needs