Create a class called StringDup. Given a string made up of ONLY letters and
digits, determine which character is repeated the most in the string ('A' is
different than 'a'). If there is a tie, the character which appears first in
the string (from left to right) should be returned.
Examples :
aaiicccnn = c
aabbccdd = a
ab2sbf2dj2skl = 2
Here is the method signature :
public char getMax(String input);
We will check to make sure that the input contains only letters and digits (no
punctuation marks or spaces). |