Question: Write a program named ProcessArray.java, and write two static methods as specified in the following header: public static int[] oddArray(int[] arr) public static int[] evenArray(int[]
Write a program named ProcessArray.java, and write two static methods as specified in the following header: public static int[] oddArray(int[] arr) public static int[] evenArray(int[] arr) the oddArray method returns a sorted (in ascending order) array that contains all odd numbers in the argument array, and the evenArray method returns a sorted array that contains all even numbers in the argument array. For example, int[] arr={ 3, 8, 1, 9, 2}; ProcessArray.oddArray(arr) should return {1,3,9} ProcessArray.evenArray(arr) should return {2,8} KEEP ALL OF THE NAMES AS THEY ARE Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
