📅  最后修改于: 2022-03-11 14:52:40.603000             🧑  作者: Mango
代码示例1
String line = "Your string here";
String stringToCount = "?";
int count = line.length() - line.replace(stringToCount, "").length();