about | help | code help+videos | done | prefs |
public boolean endsGerundIgnoreCase(String str)
public boolean endsGerundIgnoreCase(String str) { boolean ends = false; str = str.toLowerCase(); if ( str.endsWith("ing") ) { ends = true; } return ends; } (*) Use toLowerCase(), which creates a version of the string where all letters are lower case. Note that you need to RE-ASSIGN the value of this new string to the str variable: str = str.toLowerCase(); endsGerundIgnoreCase("walkING") → true endsGerundIgnoreCase("walking") → true endsGerundIgnoreCase("said") → 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: 1
Copyright Nick Parlante 2017 - privacy