Modify the method of Exercise E18.15 so that the second array list can contain elements of

Question:

Modify the method of Exercise • E18.15 so that the second array list can contain elements of a subclass. For example, if people is an ArrayList and students is an ArrayList, then append(people, students) should compile but append(students, people) should not.

Data from exercise E18.15 

Provide a static method void append(ArrayList

a, ArrayList

b) that appends the elements of b to a.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: