X167: countHi

Given a string, compute the number of times lowercase "hi" appears in the string. Make the countHi be recursive.

Examples:

countHi("xxhixx") -> 1
countHi("xhixhix") -> 2

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.