Create a program to demonstrate the use of Collections methods reverse, fill, copy, max and min Create
Fantastic news! We've Found the answer you've been seeking!
Question:
Create a program to demonstrate the use of Collections methods reverse, fill, copy, max and min
Create and display a list of three characters
Reverse and display the list
Create copy list from an array of the three Characters
Copy the contents of list in step one into copy list of the step three.
Fill list with letter R
Create a method named output and display at it shown below
Name your class “Algorithms”
Output:
list contains:
The list is: P C M
Max: P Min: C
After calling reverse, list contains:
The list is: M C P
Max: P Min: C
After copying, copyList contains:
The list is: M C P
Max: P Min: C
After calling fill, list contains:
The list is: R R R
Max: R Min: R
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date: