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

 

frew@mclean.com > isPlural
prev  |  next  |  chance

Do not sort the array. Return true if the word at the given index "i" is a plural word (ends with s). If the index is invalid, return false.


isPlural(["ball", "apple", "cat"], 2) → false
isPlural(["cogito", "ergo", "sum"], 2) → false
isPlural(["cogito", "ergo", "sum"], 3) → false

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

public boolean isPlural(String[] words, int i) { }

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: 100

Copyright Nick Parlante 2017 - privacy