Question: Design a method that, given a String s, a char c, and an int n, returns a new string in which all characters c are
Design a method that, given a String s, a char c, and an int n, returns a new string in which all characters c are repeated n times. For example, with String "Good Riddance!", character "d" and int 2, would return a String "Goodd Riddddance!" for java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
