about | help | code help+videos | done | prefs |
Write a method that returns "Han shot first!" if input parameter 'str' starts with "Maclunkey". Otherwise return the 'str' unaltered. The only string methods allowed are: .equals, .length, .substring, .charAt, and .compareTo. Look at the test data for examples. nov21_2019_APP1SLHL_swe4("Maclunkey was here") → "Han shot first!" nov21_2019_APP1SLHL_swe4("Maclunkey") → "Han shot first!" nov21_2019_APP1SLHL_swe4("Maclunk") → "Maclunk" ...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