Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a class named MyString with the following: A private default constructor. A public static method named removeAny, which takes two String parameters named s1
Write a class named MyString with the following: A private default constructor. A public static method named removeAny, which takes two String parameters named s1 and s2 and returns a String. The method should remove any of the characters that are in s1 from s2. For example, if s1 is "bet" and s2 is "wettable", then the characters 'b', 'e', and 't' will be removed from "wettable" (in any order). The resulting returned value would be "wal". You may use at most one single loop (i.e. no nested loops).
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