Another version of Hartshorne's connectedness theorem given in Commutative algebra: with a view toward to algebraic geometry, David Eisenbud, theorem 18.12, p.455:
Let $R$ be a local ring and let $I$ and $J$ be proper ideals of R whose radicals are incomparable. If $I \cap J$ is nilpotent, then depth$(I+J) \leq 1$. In particular, if $R$ is Cohen-Macaulay ring or even satisfies Serre's condition $S_2$, then codim $(I+J) \leq 1$.
Compare with excercise 18.13, p. 467:
Let $I, J$ be ideals of a local ring $R$ such that $I \cap J = 0$. Suppose that $R/J, R/I$, are Cohen-Macaulay rings of the same dimension $d$, and that $R/(I+J)$ is of dimension $d-1$. Show that $R$ is Cohen-Macaulay iff $R/(I+J)$ is. An affine algebraic set $X$ is called Cohen-Macaulay if $A(X)$ is Cohen-Macaulay. Then if $X$ and $Y$ are Cohen-Macaulay, and $X \cap Y$ is of codimension 1 in $X$ and $Y$, then $X \cup Y$ is Cohen-Macaulay iff $X \cap Y$ is.
So, compare two statements in excercise 18.13, I think $Z(I) = X$ and $Z(J) = Y$; $X \cap Y = Z(I+J)$ and $Z(I \cap J) = X \cup Y$, and this would be true for theorem 18.12. Eisenbud took an example for theorem 18.12 is "a variety that looks locally like two surfaces meeting at a point is not Cohen-Macaulay" (figure 18.2) . In that case, the coordinate ring of variety looks like two surfaces meeting at a point in a four-space can be viewed as $R = k[x,y,z,w]/(xz,xw,yz,yw)=k[x,y,z,w]/(x,y) \cap (z,w)$ ($k$ is an algebraic closed field). So, we have $I=(x,y)$, $J=(z,w)$ and $Z(I+J)$ will be the meeting point. But here, $(x,y) \cap (z,w) = (xz,xw,yz,yw)$ is not even a nilpotent ideal so how can we apply theorem 18.12 for this to prove that depth$(I+J) \leq 1$ ( I think depth$(I+J)=0$ at this case, but does depth$((x,y)+(z,w))=0$ ) ? Am I wrong at somewhere ? Thank you so much !