id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

grads


Return the number of times that the string "grad" appears anywhere in the given string, except we'll accept any letter for the "r", so "ggad" and "gead" count.


grads("aaagradbbb") → 1
grads("gradxxgrad") → 2
grads("gwadzdxxghad") → 2

...Save, Compile, Run (ctrl-enter)

public int grads(String str) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 200 Post-solution available

Copyright Nick Parlante 2017 - privacy