Everytime i input a number it gives me the array out of bounds Eception error : 3 and hihglights the product = product * A{i} bit i would be grateful for any help.

public class Accumulator {
private int[] A;

public Accumulator(int[] X) {
A= new int[X.length];
for (int i=0; i<X.length; i++)
A[i] = X[i];
}

public int prodA(int...