Question: Write a static method named smalletValueTwice. The method should accept a int array as a parameter, and it should return true if the smallest
Write a static method named smalletValueTwice. The method should accept a int array as a parameter, and it should return true if the smallest value in the array shows up more than once. Otherwise it should return false. So if the values are [7, 4, 8, 2, 5, 2, 6] then the method would return true. Since the smallest value (which is 2) shows up more than once. If the values were [9, 4, 6, 5, 7, 5] then the method would return false, since the smallest value (which is 3) only shows up once.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
