Java scanner for 2 character combinations -


i have made scanner in java displays how many letters there in input text, how many 'a' letters, 'b' letters, etc. real thing need here fir scanner me display how many "ch", "au", "iu" , other 2 letter combinations there in text. since new coding, have no clue on how it.

you can use indexof() method of string class , know number of occurrences. basic google search.

else, can use third party libraries apache commons , use api

stringutils. countmatches()


Comments

Popular posts from this blog

javascript - How to bind ViewModel Store to View? -

recursion - Can every recursive algorithm be improved with dynamic programming? -

c - Why does alarm() cause fgets() to stop waiting? -