Question: 3. (10 points) Write a method static List slice(List 1, int i, int j). slice should return, as a list, the elements of 1 with

 3. (10 points) Write a method static List slice(List 1, int

3. (10 points) Write a method static List slice(List 1, int i, int j). slice should return, as a list, the elements of 1 with indices between i (inclusive) and j (exclusive), in the order they appeared in 1. It must not modify the original list 1. For example, with an input of 1 = [3, 4, 5, 6], i = 1, j = 3, it should return the list [4, 5]. Assume 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!