| about | help | done | prefs | create account |
Java > String-3 > gHappy
prev | next | chance
| We'll say that a lowercase 'g' in a string is "happy" if there is another 'g' immediately to its left or right. Return true if all the g's in the given string are happy.
gHappy("xxggxx") → true gHappy("xxgxx") → false gHappy("xxggyygxx") → false ...Save, Compile, Run See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops |
Forget It! -- delete my code for this problem 312.0
Copyright Nick Parlante 2006-10 - privacy