Our friend can't stand the r
letter (no joke). Will you help him get rid of them in the text?
Create the companion object with removeLetter()
function that accepts the String input
variable and returns an array of characters.
In the array, lowercase all letters and replace all r
characters with !
. Be sure the method removeLetter()
should be considered as a static method in Java code!
//input example
val input = "Remove Letters"
//result example
['!', 'e', 'm', 'o', 'v', 'e', ' ', 'l', 'e', 't', 't', 'e', '! ', 's']