Question: This is Java code and I'm trying to do what it tells me in the bottom but im having issues returning it for that Getfirsthalf.

This is Java code and I'm trying to do what it tells me in the bottom but im having issues returning it for that Getfirsthalf.  /** slices the array in two at position n and returns the first slice * the value at position n is not included in the first slice * @param nums array to be sliced * @param n position in which to slice the array * @return the left half of the sliced array */ public static int[] getFirstHalf(int[] nums, int n) { for (n=0; n  

Also, there is a second part to this which is getsecondhalf

/** slices the array in two at position n and returns the second slice * the value at position n is included in the first slice * @param nums array to be sliced * @param n position in which to slice the array * @return the right half of the sliced array */ public static int[] getSecondHalf(int[] nums, int n) { return null; // TODO: implement this method } /** sums the values in an array of integers. * * @param nums array of values to be summed * @return sum of all of the values in nums */ public static int sumArray(int[] nums) { int sum = 0; for (int value) return 0; // TODO: implement this method } } 

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!