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
Post a Comment