Confusion about the centre of a p-group If a non-cyclic group $G$, non-commutative also has  order $p^{3}$  does  that mean for every $x\in G$ , $x^{p}$ is in $Z(G)$?  I am trying to solve  a problem  from $p$-groups and at this  point  I am stuck.

Let $G$ be non-commutative of order $p^3$, and $Z$ be its center.
Then for any $g ∈ G$ we have $g^p ∈ Z$, since $G/Z\simeq  \mathbb{Z}/(p) × \mathbb{Z}/(p)$ (this follows since $G/Z$ cyclic would imply $G$ abelian).
