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

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

Step by Step Solution

3.46 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Lets create a Java program to demonstrate the use of Collections methods reverse fill copy max and m... 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 Programming Questions!