complement of zero set of holomorphic function is connected I'm stuck with the following part of exercise 1.1.8 in Hubrechts book Complex geometry:
Prove that, if $U \subset \mathbb C^n$ is open connected, then $U \setminus Z(f)$, the complement of zero set of a non trivial holomorphic function $f:U\to \mathbb C$, is connected.
I know I could use Riemann extension theorem, but I'm messing things with this point: suppose $U \setminus Z = A \cup B$ with $A$ and $B$ open non-empty disjoint; how do I see that there's point $x \in \overline A \cap \overline B \cap Z$?
 A: Suppose $\overline{A}\cap\overline{B}\cap Z = \varnothing$. Since $A$ and $B$ are open (in $U$, or equivalently in $\mathbb{C}^n$), we have
$$\overline{A}\cap B = \varnothing = A\cap\overline{B},$$
and thus $\overline{A}\cap \overline{B} \subset Z$. The supposition thus implies that $\overline{A}$ and $\overline{B}$ are disjoint, and thus
$$\varnothing = \overset{\Large\circ}{Z} = U\setminus \overline{U\setminus Z} = U\setminus \overline{A\cup B} = U\setminus (\overline{A}\cup \overline{B}),$$
which means that $U$ is the disjoint union of the nonempty closed sets $\overline{A}$ and $\overline{B}$, and therefore $U$ is not connected. This contradicts the premise that $U$ is connected, hence the supposition $\overline{A}\cap\overline{B}\cap Z = \varnothing$ must have been wrong.
So the conclusion that $\overline{A}\cap\overline{B}\cap Z \neq \varnothing$ follows if $Z$ is any nowhere dense closed subset of $U$. Since there are nowhere dense closed sets $F\subset U$ such that $U\setminus F$ is not connected, you need special properties of the zero sets of holomorphic functions to conclude that $U\setminus Z$ must be connected. Off the top of my head, I can't think of another way than the Riemann extension theorem.
A: Idea: reduce to complex dimension $1$. Let $a$, $b$ in $U \backslash Z(f)$. Consider a polynomial path $\gamma \colon [0,1] \to U\subset \mathbb{C}^n$, $\gamma(0) = a$, $\gamma(1)=b$. Consider the extension of $\gamma$ as a polynomial map from $\mathbb{C}$ to $\mathbb{C}^n$, and let $V$ be the connected component of $\gamma^{-1}(U)$ containing $0$, $1$. Now $g \colon = f\circ \gamma\colon V \to \mathbb{C}$ holomorphic, $V$ connected, and  $0$, $1\in V \backslash Z(g)$. Since $Z(g)$ is at most countable,  $V\backslash Z(g)$ is also connected. Take a path $c$ from $0$ to $1$ in $V$. Then $\gamma \circ c$ is a path from $a$ to $b$ in $U\backslash Z(f)$.
