Question: If I have an object array in Java `Car[] a = {0,1,2,3,4,5,6,7}`. How would I make a copy of this array from index 2 to 7? 

I thought about making a for loop

```
Car[] b = new Car[a.length - 2];

for (int i = 2; i < a.length; i++) {
  b[i - 2] = a[i];
}

```

Is there another way by using some of Java's built in Library? If there is, would it be more or less efficient than the for loop I proposed?

Answer: 
You can use 

```
Car[] splitArray = Arrays.copyOfRange(a, starting_index, end_index);

```
CopiesofRange() of the Arrays seems to be a recommended method to perform a copy of a specified range into another array.

Signature

```
public static <T> T[] copyOfRange(T[] original,
                  int from,
                  int to)

```

T is generic and can be replaced by any class or primary type of variables.