Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program to demonstrate the use of Collections methods reverse, fill, copy, max and min Create and output a list of three characters Let's

Create a program to demonstrate the use of Collections methods reverse, fill, copy, max and min

  1. Create and output a list of three characters
    • Let's use name initials
    • If you do not have three initials then use the character N
  2. Reverse and output the list
  3. Create copy list from an array of the three Characters
  4. Copy the contents of list in step one into copy list of the step three, output the copied list.
  5. Fill the initial list with the letter R and output the list.
  6. Create a method named output and display the characters in your list
  • public static void Output(List l)
  • Call this function when you want to output your list
  • Function should iterate through the list using a method discussed in the lecture

Output:

Example output

Initial List B M W Reversed List Copied List WM B R Filled List ??

Initial List BMW Reversed List W MB Copied List WMB R Filled List RRR

Step by Step Solution

3.48 Rating (161 Votes )

There are 3 Steps involved in it

Step: 1

ListDemojava package myPackage import javautil public class ListDemo public List list List will caon... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Marketing Mistakes And Successes

Authors: James F. Dartley

11th Edition

978-0470169810, 0470169818

More Books

Students also viewed these Programming questions

Question

What purpose do form ties serve in a concrete wall form?

Answered: 1 week ago

Question

What is a social role? (p. 30)

Answered: 1 week ago

Question

What is beacon marketing? What are digital wallets?

Answered: 1 week ago

Question

Which are the strongest parts?

Answered: 1 week ago

Question

Which character has an opposite script?

Answered: 1 week ago