I'm writing a class called List which creates an instance variable array of Customers (Customer is just another class that accepts String parameters for a person's name),
i.e private Customer[] data
I'm trying to write an append method that will take a Customer and add it to another List in the main method.
To do this, there seems to be a method called addAll(), but since I'm writing this code by scratch, I can't use this. I looked at the pseudo code though for this method to get a general idea and it converts the Object into an array and then uses arraycopy to append the two lists.
I meant to say, this way makes sense to me, if I were using arrays, but I'm trying to add a Customer object from another list and add them to a list in the main method.
arraycopythen you must be using arrays (notLists). Please provide more context.List s, I meant that I understand why the pseudo code usesarraycopy, but that I want to understand how to do it without, because I'm not usingarraycopy