Home /
Expert Answers /
Other /
solve-in-java-return-the-number-of-even-ints-in-the-given-array-note-the-mod-operator-computes-the-r
(Answered): Solve in Java. Return the number of even ints in the given array. Note: the % "mod" operator compute ...
Solve in Java.
Return the number of even ints in the given array. Note: the % "mod" operator computes the remainder, e.g. 5 % 2 is 1. countEvens([2, 1, 2, 3, 4]) — 3 countEvens([2, 2, 0]) — 3 countEvens([1, 3, 5]) 0 Go ...Save, Compile, Run (ctrl-enter) public int countEvens(int[] nums) { }