about | help | code help+videos | done | prefs |
Write a method that returns 'true' if 'orig' begins with 'starts'. For example, if 'orig' is "Testing" and 'starts' is "Test", return true because 'orig' starts with 'starts'. For this problem you are restricted in the string methods you may use. The only string methods allowed are .length, .substring, and .equals. Look at the test data for examples. test2022_11_17_APP1SLHL_startsWith("A man a plan a canal Panama", "A man a plan a canal Panama") → true test2022_11_17_APP1SLHL_startsWith("A man a plan a canal Panama", "A man a plan a canal Panam") → true test2022_11_17_APP1SLHL_startsWith("A man a plan a canal Panam", "A man a plan a canal Panama") → false ...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: 230
Copyright Nick Parlante 2017 - privacy