Asked by Josh
Create a method called countSelected, which takes an array of integers and an integer as input parameters and returns the number of occurences of the integer in the array.
Example:
data:{2, 1, 1, 8, 1, 0}
select:1
==> 3
public int countSelected (int[] data, int select) {
Example:
data:{2, 1, 1, 8, 1, 0}
select:1
==> 3
public int countSelected (int[] data, int select) {
Answers
There are no human answers yet.
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.