Array dalam konstruktor java


//To allocate an integer array which all elements are initialized to zero, write this in the constructor:

data = new int[3];
//To allocate an integer array which has other initial values, put this code in the constructor:

int[] temp = {2, 3, 7};
data = temp;
Tame Teira