Let $G$ and $H$ be finite groups.
If $|G|$ and $|H|$ are coprime, the only homomorphism $G\rightarrow H$ is the trivial homomorphism.
But the condition is not necessary. If $G=A_4$ and $H=C_2 \times C_2\times C_2\times C_2$, then the only homomorphism $G\rightarrow H$ is the trivial one, but $|G|=12$ and $|H|=16$ are not coprime.
This can be shown by using the special property $ord(x)=2\ ,\ ord(y)=3 \implies ord(xy)=3$ , holding in the group $A_4$. How can I generalize this example ?
Is there an easy criterion, when there is only one homomorphism $G\rightarrow H$ for finite groups $G$ and $H$ ?