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

 

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

Write a method the returns how many times "ie" or "IE" appears in the input parameter string. Only count those exact matches, not other combinations such as "Ie" or "iE". You may only use the following string methods: .length, .substring, .charAt, .equals.


dec18_2017_APSLHL_iBeforeE("this is a test of ie ie but not either way") → 2
dec18_2017_APSLHL_iBeforeE("IeiE does not count. But ie and IE do count.") → 2
dec18_2017_APSLHL_iBeforeE("eieio") → 1

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

public int dec18_2017_APSLHL_iBeforeE(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: 240

Copyright Nick Parlante 2017 - privacy