- Reverse a String 1
- Reverse Each Word
- Reverse a Sentence
- Palindrome
- Find Words
- CountIng Search
- Unique Characters
-
Java Sandwich - Anagrams 1
- Anagrams 2
- Counting Search 2
Java String Resources:
CountIng Search
Collapse Content
Show Content
The previous challenge asked for word occurrences, but this one is about text matches.
How many times does the String "ing" (lowercase) appear in a given text? It can appear as part other words or on its own.
For example,
He was searching on Bing for Singing Kings.should return
5
Challenge
Return the number of times "ing" appears in a given text.
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.
Comments
thales
Jul 23, 7:20 AMa char is not af reference but a value (primitive) so .equal wont work cause it cant be dereferenced.. i learned this doing this example. complicated but we do learn :-)
a solution:
my code