简单的暴力
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in =new Scanner(System.in);
String a=in.nextLine();
int max=-1000000000;
int num=0;
char c=0;
char[] b=new char[1010];
b=a.toCharArray();
for(int i='a';i<='z';i++){
for(int j=0;j<a.length();j++){
if(i==b[j]){
num++;
}
if(num>max){
max=num;
c=b[j];
}
}
num=0;
}
System.out.println(c);
System.out.println(max);
}
}