check how many times a character appears in a string java

105

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

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

Comments

Submit
0 Comments