统计字符串中含指定字符个数
想了一种字符替换的方法,然后比对前后字符串的长度,达到统计指定字符个数的目的。public class CalcCharTest { public static void main(String[] args) { String str = "13143948543879847234982123erwefeeeeefwafegegregfweafreg"; long startTime = System.currentTimeMillis();