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 output a list of three characters
- Let's use name initials
- If you do not have three initials then use the character N
- Reverse and output 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, output the copied list.
- Fill the initial list with the letter R and output the list.
- 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
Related Book For
Posted Date: