Let U be a connected open set, and $\displaystyle U^c $ its closure. Let f be a continuous function on $\displaystyle U^c$, analytic and nonconstant on U. If $\displaystyle z_0 \in U^c$ is a maximum point for f, then $\displaystyle z_0 $ lies on the boundary of $\displaystyle U_c$

Now, the book says this comes from a direct application of the global maximum modulus principle, which states:

If U is a connected open set, and f is analytic on U that has a maximum point in U. Then f is constant on U.

I understand the proof of the principle, but how do I apply that to the first statement? Thanks.