Question: Write the method middle that takes an array a and returns a new array holding the middle third of a. You may assume that the

 Write the method middle that takes an array a and returns

Write the method middle that takes an array a and returns a new array holding the middle third of a. You may assume that the length of a is a multiple of 3. For example middle (15, 4, 1, 6, 3, 2}} returns {1, 6}//returns the middle third of a public static int middle (int [] a) Write the method reversed that returns true if and only if the arrays a and b contain exactly the same elements, but in reversed order. For example reversed ({3, 1) {1, 3}) returns true, but reversed ({3, 1}, {2, 3}} and reversed ({3, 1}, {1, 1, 3} both return false.//returns true iff a and b contain the same elements, reversed public static boolean reversed (int [] a, int b)

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!