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

 

davereed@creighton.edu > occurArrayList
prev  |  next  |  chance

occurArrayList() -- You are given an integer and an ArrayList of integers, and want to determine how many times that integer occurs in the ArrayList. Your method should return that count.


occurArrayList(9, [9]) → 1
occurArrayList(8, [9]) → 0
occurArrayList(1, [1, 2, 3, 2, 4, 2, 5]) → 1

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

public int occurArrayList(int num, ArrayList<Integer> numlist) { }

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

Copyright Nick Parlante 2017 - privacy