public String toString()
    {
        String answer = "["; // open bracket
        for (int i=0; i < this.size-1; i++)
            answer += this.array[i]+", "; // all elements but last followed by commas
        if (this.size>0) // if at least one element, follow last one by ]
            answer += this.array[this.size-1] + "]";
        else
            answer += "]"; // immediate close bracket if no elements ([])
        return answer;
    }