Question: ACTIVITY7 7.4.2: Finding values in an array Set numMatches to the number of elements in userValues (having NUM_VALS elements) that equal matchValue. Ex: If matchValue

ACTIVITY7 7.4.2: Finding values in an array Set numMatches to the number of elements in userValues (having NUM_VALS elements) that equal matchValue. Ex: If matchValue 2 and userValues 2, 2, 1,2), then numMatches-3. (Notes) 1 inport java.uti1.Scanner 3 public class FindMatchValue l 4public static void nain (String[] args) t tast final int NUMVALS4; int[] userValuesnew int [NUM VALS] int i int matchValue; int numMatches -99; // Assign nunMatches with before your for loop 18 userValues [] 2 userValues [1]2 userValues[2]1 userValues [3]2 12 13 14 15 16 17 18 19 28 21 22 H natchValue 2 Your solution goes here System.out.println( matchValue:atchValue nunMatches: "+nunMatches); Run
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
