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

 

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

Return the count of all the even numbers in the array list. Hint: The % operator may be useful.


listEvenCount([1, 2, 3, 4]) → 2
listEvenCount([8, 16, 10]) → 3
listEvenCount([5, 0, 22]) → 2

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

public int listEvenCount(List<Integer> numsList) { }

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