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

 

pluralize


The method pluralize will take a string array and add an "s" at the end of every word as long as it doesn't already have an s at the end.
For example, {"cat", "dog", "apples"} would return {"cats", "dogs", "apples"}


pluralize(["a", "e", "i", "o", "u", "s"]) → ["as", "es", "is", "os", "us", "s"]
pluralize(["Galisi", "Tan", "Comp Sci", "is fun"]) → ["Galisis", "Tans", "Comp Scis", "is funs"]
pluralize(["hi", "bye"]) → ["his", "byes"]

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

public String[] pluralize(String[] words){ }

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: 200 Post-solution available

Copyright Nick Parlante 2017 - privacy