Question: undefined In this next problem, you will implement a method that will return a String with an array's elements separated by spaces. The method will
undefined
In this next problem, you will implement a method that will return a String with an array's elements separated by spaces. The method will receive three parameters: the integer array, a start index, and an end index. Both start and end are Inclusive. The method's signature is as follows: public static String printRange (int[], int, int) (make the method public to facilitate testing) If the indexes are outside the bounds of the array, the method should return "Invalid Range." Otherwise, the method will return a String containing one integer after the other on the same line separated by one space. Example I Given (4,1,2,36,6), 1, 3 as the parameters; the method should return "12 36" Example 2 Given (4,1,2,36,6), 0, 7 as the parameters; the method should return "Invalid Range" There are no I/O tests on this problem; all tests are unit tests. This means that you don't have to worry about creating a scanner or even the main method. All you have to implement the method and Mimir will test your method directly. The tests will only run if the method's signature is correct
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
