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

 

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

Write a method that accepts any string. Return a string where each occurrence of "ph" is replaced with "f". Only replace a lower-case "ph" with a lower-case "f". So "Ph" and "PH" and "pH" do NOT get replaced!


chronicPhysics("Physics is phun!") → "Physics is fun!"
chronicPhysics("Once upon a time") → "Once upon a time"
chronicPhysics("") → ""

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

public String chronicPhysics(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: 250

Copyright Nick Parlante 2017 - privacy