Question: 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
Get step-by-step solutions from verified subject matter experts
