Question: // Complete the code in the PICTURE. JAVA Programming import java.util.*; public class LabEmpty { public static void main(String[] args) { List al = new

// Complete the code in the PICTURE. JAVA Programming

import java.util.*;

public class LabEmpty { public static void main(String[] args) { List al = new LinkedList(); // Add items to the List String song = "Across the Universe"; for (int i = 0; i

// Uses a ListIterator to traverse the list public static void traversal (List list) { ListIterator li = list.listIterator(); while (li.hasNext()) System.out.print(li.next()); System.out.println (""); } // Delete blanks and convert alphabetic characters to upper case public static void modifyList (List list) { //Code in the PICTURE goes here.

} } }

// Complete the code in the PICTURE. JAVA Programming import java.util.*; public

Download and compile the LabEmpty java file. The program builds a linked list of characters. Complete the modifyList method. Use a Listlterator that traverses the entire list of characters. As it traverses the list, the iterator should delete every blank character. It should also replace alphabetic characters with their uppercase equivalent. While your code should work for any list, for the sample list, the output should be: ACROSSTHEUNIVERSE Once you are satisfied that your method works as expected, complete the missing code elements below. public static void modifyList (List list) ListIterator it list.listterator(); while ( char ch if (ch ' else Character.toUpperCase(ch))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!