📅  最后修改于: 2022-03-11 14:52:32.208000             🧑  作者: Mango
代码示例1
public int countLetterB(String s) {
int count = 0;
for (char c: s.toCharArray()) {
if (c == 'b') {
count++;
}
}
return count;
}