Let $\pi: Z \rightarrow Z_2$ be the canonical epimorphism. The induced map $$ \overline{\pi}:\operatorname{Hom}(Z_2,Z)\to \operatorname{Hom}(Z_2,Z_2) $$ is the zero map. Since $\operatorname{Hom}(Z_2,Z_2) \neq 0 $ (since $\operatorname{Hom}(Z_2,Z_2) \cong Z_2 $), $\overline{\pi}$ is not an epimorphism.
This is from Hungerford book, section $4.4$:
I don't know if it is a typo but if I follow the definition
then:
The induced map $\overline{\pi}:\operatorname{Hom}(Z_2,Z)\to \operatorname{Hom}(Z,Z)$ is indeed the zero map since $\operatorname{Hom}(Z_2,Z)=\{0\}$ , we can say that $\operatorname{Hom}(Z,Z)\neq \{0\}$ so that $\overline{\pi}$ is not an epimorphism.
Please would you confirm if there is a typo or if I am missing something?

