Remove Char This function will be given a list of strings and a character. You must remove all occurrences of the character from each string in the list. The function should return the list of strings with the character removed. Signature: public static ArrayList removeChar(String pattern, ArrayList list) Example: list: ['adndj', 'adjdlaa', 'aa', 'djoe'] pattern: a Output: ['dndj', 'djdl', '', 'djoe']

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.5: Case Studies
Problem 3E
icon
Related questions
icon
Concept explainers
Question

Remove Char

This function will be given a list of strings and a character. You must remove all occurrences of the character from each string in the list. The function should return the list of strings with the character removed. 

Signature:

public static ArrayList<String> removeChar(String pattern, ArrayList<String> list)

Example:
list: ['adndj', 'adjdlaa', 'aa', 'djoe']
pattern: a

Output:  ['dndj', 'djdl', '', 'djoe']

Expert Solution
steps

Step by step

Solved in 6 steps with 3 images

Blurred answer
Knowledge Booster
Types of Linked List
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr