Question: can you write the solution in java and for the only two methods used be the main method and cleanString and for it to work

Given a user inputted String write a tecursive method (no loops) to "clean" the String A. cleaned string is one where only odjacent characters that ace the aamie have been reduced to a singe chat, So "yyzzea" yields "Yza': You should call your method clean String? For Example: - cleanstring (Yyzzza") "yzo" - clearstringi "ggoonnee"7 "gone" - cieanstringr7ello 7 Helo Input D. whece n is a string Sample innut yyztia Output Output A "cleaned" String Sample Output yza
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
