check how many times a character appears in a string java

108

check how many times a character appears in a string java -

str.chars().filter(num -> num == '$').count()

Comments

Submit
0 Comments