Suppose that $V$ is the bounded open subset of the plane and $f\in C(\bar V)\cap H(V)$. Show that if $M\ge 0$ and $|f(z)|\le M$ for all $z\in\partial V$ then $|f(z)|\le M$ for all $z\in V$.
I was trying to apply maximum modulus principle or open mapping theorem but the open set $V$ is not given to be connected and since then i have no idea how to do it.
Any type of help wil be appreciated. Thanks in advance.
Hint: $\sup_{\overline {V}}|f|= |f(z_0)|$ for some $z_0 \in \overline {V}.$ If $z_0 \in \partial V,$ we're done. If not, $z_0$ is in some connected component of $V.$