Question: Write a method called toArray that returns an array containing the items stored in the list. It returns an empty array object if the list
Write a method called toArray that returns an array containing the items stored in the list. It returns an empty array object if the list was empty. It is important to note that the client must create an array refrence to type Object, which is to capture the return type of the toArray operation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
