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

 

konstans@stuy.edu apcs1 > listCatty
prev  |  next  |  chance

An array list contains a list of animals. If the animal is a cat (i.e. the animal's description contains the word "cat" or "Cat"), then add it to a new array list. Return the new array list of cats.


listCatty(["buffalo", "dog"]) → []
listCatty(["bobcat", "siamese cat", "catbird"]) → ["bobcat", "siamese cat", "catbird"]
listCatty(["Cat", "frog", "mouse"]) → ["Cat"]

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

public List<String> listCatty(List<String> animalsList) { }

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

Copyright Nick Parlante 2017 - privacy