Question: Write method public static Arraylisto ArrayList concatenate ( ArrayList a , ArrayList b ) that concatenate one array list after another. For example, ifais [
Write method public static Arraylisto ArrayList concatenateArrayList a ArrayList b
that concatenate one array list after another. For example, ifais Dear Mr Adam, Smith
and b is wish you, happy New, Year then concatenatel returns the array list Dear Mrr Adam, Smith,
wish, you, happy, New, Year
The elements of the array list should be entered by the user.
Sample Input
Enter element:
Dear
Enter to stop or else to continue
Enter element:
Mr
Enter to stop or else to continue
Enter element:
Davis
Enter to stop or else to continue
Enter element:
Happy
Enter to stop or else to continue
Enter element:
New
Enter to stop or else to continue
Enter element:
Year
Enter to stop or else to continue
Sample Output
Dear Mr Davis, Happy, New, Year
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
