Question: Write a method public static ArrayList append(ArrayList a, ArrayList b) that appends one array list after another. For example, if a is 1 4 9

Write a method

public static ArrayList append(ArrayList a, ArrayList b)

that appends one array list after another. For example, if a is 1 4 9 16 and b is 9 7 4 9 11 then append returns the array list
1 4 9 16 9 7 4 9 11

Step by Step Solution

3.32 Rating (182 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here we can use addAll method to concatenate two arraylists PROGRAM import jav... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Concepts Late Objects Questions!