Question: Whats wrong with my code? Failing on the last test dealing with calculating the amount of odd and even numbers public class Main { public

Whats wrong with my code? Failing on the last test dealing with calculating the amount of odd and even numbers

public class Main { public static int[] oddAndEven(int[] array) { int result[] = new int[2]; result[0] = 0; result[1] = 0; for (int i = 0; i

Whats wrong with my code? Failing on the last test dealing with

1:Structure Test 01 20/2 oddAndEven method has correct return type, name, and parameter list Test feedback PASS - public static int[] oddAndEven(int []) method found. 2 :Logic Test 01x Given myArray ={1,2,3,4,5}, oddAndEven(myArray) should return {3,2} Test feedback 3:Logic Test 02 20/ Given myArray ={3,7,6,2,9,0,4,8}, oddAndEven(myArray) should return {3,5} Test feedback 4 LLogic Test 03 Given myArray ={1,1,1}, oddAndEven(myArray) should return {3,0}

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!