Question: in java please Character method returns the first repeated character in the given string. or returns the character ' ' if no characters are repeated
Character method returns the first repeated character in the given string. or returns the character ' ' if no characters are repeated charRepeat("I love CSCE111") returns 'C' charRepeat ("The bill is $12.97 ") returns ' i ' charRepeat("Bananas for monkeys.") returns ' a ' charRepeat ("cat") returns ' ' charRepeat('i') returns ' ' aparam text String, ereturn the first repeated charracter in a string. * public static char charRepeat(String text) \{ I/ Your answer here. Edit the assignment and return statement as necessary.I return '0'; H// end charRepeat
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
