Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a complete method to create a modified ArrayList. Method Specifications The method takes in an ArrayList of Strings as a parameter. The method creates
Write a complete method to create a modified ArrayList. Method Specifications The method takes in an ArrayList of Strings as a parameter. The method creates and returns a new ArrayList of Strings that contains only the Strings from the parameter list that start with a letter or digit. Any Strings that do not start with a letter or digit (e.g., start with: & * ! \\t etc.) should not be added to the new list. The list parameter should not be changed. Hint: Review the static methods of Character class! Test Cases Here are some lists I suggest using for testing. Parameter ArrayList ["hello!", "?what", "email@com", "#javarules", "3blindmice", "&more"] ["no!", "answers?", "found#here", "4sure"] ["$money", "^carrot", "(parens", ")parensclose", "\\ttab"] ["Apple!", "Ball?", "Carrot."] ["1", "2", "3", "4"] ["\\"a\\"", "\\'b\\"", "c"] Returned ArrayList ["hello!", "email@com", "3blindmice"] [no!", "answers?", "found#here", "4sure"] [] ["Apple!", "Ball?", "Carrot."] ["1", "2", "3", "4"] ["c"]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started