package opop;
import java.util.Scanner;
public class Domashnoto {
static public void main(String[] args){
Scanner input = new Scanner(System.in);
System.out.println("Text:");
String s = input.next();
s = s.toLowerCase();
s = s.replaceAll("[^A-Za-z]+", "");
s.replaceAll("\\s+", "");
int j;
int i;
for (j = 0 ; j <= s.length() ; j++){
int counter = 0;
for (i = 0 ; i <= s.length(); i++){
if(s.charAt(i) == s.charAt(j)){
counter++;
}
}
System.out.println(s.charAt(i) + " " + "-" + " " + counter);
}
}
}
帮助!我只是不知道什么不好