No "J"

Report a typo

Implement a method that does the following algorithm:

  1. creates List<String> from a given array of strings;
  2. using ListIterator, removes all items not starting with "J" ;
  3. removes "J" from items beginning with "J" (e.g., JFrame -> Frame);
  4. prints all the remaining elements in the reverse order.

Sample Input 1:

ImageButton JTextField JTextArea CheckBox JMenu

Sample Output 1:

Menu
TextArea
TextField
Write a program in Java 17
Loading...

Create a free account to access the full topic