id/email
password
forgot password
about | help | done | prefs | create account
JavaBat java practice problems

String-2 > countHi
prev  |  next  |  chance

Return the number of times that the string "hi" appears anywhere in the given string.

countHi("abc hi ho") → 1
countHi("ABChi hi") → 2
countHi("hihi") → 2

...Save, Compile, Run         

See Also: Example Code Java help: If Boolean Logic | Strings | While and For Loops | Arrays and Loops


prev  |  next  |  chance   |  JavaBat  >  String-2

Forget It! -- delete my code for this problem 206.0

Copyright Nick Parlante 2006-09 - privacy