Search an unsorted list of 20 integers and return the number of times a user specified search Value is found. When the searchValue is in the list, display the position of the first occurrence.
- Use the array initializer in your program.
- Use the following methods in your program:
public static int occurs (int searchValue, int[] numbers)
public static int firstPosition (int searchValue, int[] numbers)
Do not call firstPosition if occurs returns a zero.
Here is one sample session and output (you choose a number for the second run):
Enter a value: 120
120 occurs 2 times, the first occurrence is at position 12