Question: Need some help for java class homework Question1:Write a complete method (including a full method header) called contains. The method: takes an int array and
Need some help for java class homework
Question1:Write a complete method (including a full method header) called contains. The method:
takes an int array and an int variable as parameters
returns true if the array contains the value; returns false otherwise
For example, invoking contains with [3, 1, 4, 6] and 5 would return false (5 is not in the array). Invoking contains with [3, 1, 4, 6] and 6 would return true (6 is in the array).
Question2:Write a complete method to do the following:
create an array that holds 100 integers
fill the array with random numbers between 0 and 500 (inclusive)
loop through the array and print to the screen any number that is divisible by 7
Make sure the code is inside of a complete method- not inside of main.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
