I have this method:

```
public static long[] computeDifferenceArray(long[] array) {
    long[] diffArray = new long[array.length - 1];
    for (int i = 0; i < diffArray.length; i++) {
        diffArray[i] = array[i + 1] - array[i];
    }

    return diffArray;
}

```

Currently, it only accepts `long[]` and returns a `long[]`. But I want to use this same method on `int[]` as well. How can I do that?

I have read that Java Generics only work on class objects.