Question: Write a method that takes an array (A) of integers number as parameter, splits A into two arrays B and C as follow, then prints

Write a method that takes an array (A) of integers number as parameter, splits A into two arrays B and C as follow, then prints B and C. Example:

A 4 65 23 94 12 56 33 89 34 23

B 4 65 23 94 12

C 56 33 89 34 23

Test this method in the main by creating an array of size entered by the user (the size should be even number). The array A is filled randomly with numbers between 1 and 100. Display the original array as well as the resulting arrays. Hint: you can write and use the method void displayArray(int [] T). Sample Run1: Enter the size of the array: 7 7 is not an even number Enter the size of the array: 8 The first array: 4 65 23 94 12 56 33 89 34 23 The second array:4 65 23 94 12 The third array: 56 33 89 34 23

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!