Question: Please write code in Java 7) Given an integer array, the method below should return the count of the amount of odd numbers which occur

Please write code in Java
Please write code in Java 7) Given an integer array, the method

7) Given an integer array, the method below should return the count of the amount of odd numbers which occur in the array. Example calls and return values for the mothod are shown belowe Write the code needed for the method to work as intended. (feminder: use 22 to determine whether a number is divisible by 2 , or not) Your method MuST use a for-each loop. oddCount ({4,5,1,3,1,8,2,1)}5 oddCount ((4,2,2,2,2,2))0 oddCount ({3,5,10})2 public int oddCount ( intl] nums) f \} 8) Given an ArrayList of integers and an integer, the method below should return true if the integer occurs at least once in the ArrayList, or faise if the integer is not in the Arraylist. Example calls and return values for the method are shown below. Write the code needed for the method to work as intended. Your method MUST use a traditional for-loop. (NOT a for-each loop) findlt ({4,5,1},7) false findit ({4,2,4,3},4) true findlt ({1,2,3,4,5,6},6) true public boolean findit( ArrayList nums, int targetNum) f

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!