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

 

jebbert@volusia.k12.fl.us > vpeepsCountLtr
prev  |  next  |  chance

Write a RECURSIVE method that returns the number of times the character 'target' appears in the string 'str'. Your solution must be recursive! Pay close attention to the test data.


vpeepsCountLtr("wxyz", "a") → 0
vpeepsCountLtr("abcabcabcabaabaababbaaa", "a") → 12
vpeepsCountLtr("CaSe Sensitive", "s") → 1

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

public int vpeepsCountLtr(String str, char target) { }

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: 330

Copyright Nick Parlante 2017 - privacy