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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!