about | help | code help+videos | done | prefs |
The only string commands you can use for this method are: length, equals, substring, and charAt. You may use any non-string commands. Write a method that replaces the word "sunflower" with some other word. Only replace "sunflower" if it is all lower-case. Look at the test data for examples. replaceSunflower1("The state flower of Kansas is the sunflower.", "rose") → "The state flower of Kansas is the rose." replaceSunflower1("Once a sunflower, always a sunflower...", "tulip") → "Once a tulip, always a tulip..." replaceSunflower1("sunflowersunflowersunflower", "hybiscus") → "hybiscushybiscushybiscus" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290
Copyright Nick Parlante 2017 - privacy