boolean (Object o) { if (o instanceof IntStack) { IntStack otherStack = (IntStack)o; if (size != otherStack.size) return false; for (int i = 0; i < otherStack.size; i++) { if (data[i] != otherStack.data[i]) return false; } return true; } return false; }