Question: Please help me and understand how to Create a Java program with a method that searches an integer array for a specified integer value (see
Please help me and understand how to Create a Java program with a method that searches an integer array for a specified integer value (see help with starting the method header below). If the array contains the specified integer, the method should return its index in the array. If not, the method should throw an Exception stating "Element not found in array" and end gracefully. Test the method in main with an array that you make and with user input for the "needle"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
