@Override
    public String toString() {
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < array.length; i++) {
            sb.append("Array[" + i + "] = " + array[i]);
            if (i < array.length - 1) {
                sb.append("\n");
            }
        }
        return sb.toString();
    }