Exercise 1
Write a public static Java method that receives as parameters a string s and a character c, and returns the string obtained from s by substituting each occurrence of a vocal with c.
For example, given the string "pippo"
and the
character 'e'
, the method should return the string
"peppe"
.
Exercise 2
Write a public static Java method that receives as parameter a string s and returns the string obtained by concatening s with s inverted.
For example, given the string "pippo"
, the method
should return "pippooppip"
.