Question: in java on intellij please - asked this and another question and it didnt work due to the public static void main(String[] args) {
in java on intellij please - asked this and another question and it didnt work due to the " public static void main(String[] args) {" being "
already defined in class Main"
Given an array of ints, return the number of 3's in the array.
arrayCountNumber([8, 6, 3]) 1 arrayCountNumber([7, 3, 3]) 2 arrayCountNumber([5, 3, 3, 5, 3]) 3
For example:
| Test | Result |
|---|---|
int[] array = {3, 9, 5, 3}; System.out.println(arrayCountNumber(array)); | 2 |
question answe box starts with
public int arrayCountNumber(int[] nums) { // TODO your code goes here }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
