TITLE: Center of $G/Z(G)$.
QUESTION [7 upvotes]: Question. Prove or disprove: The center of $G/Z(G)$ is trivial for all finite groups $G$. (Here $Z(G)$ denotes the center of $G$.)
Attempt at a Proof. 
Assume the contrary that $G/Z(G)$ has a non-trivial center. 
Let $g\notin Z(G)$ be such that $gZ(G)$ is in the center of $G/Z(G)$. 
Then $$\boxed{xgx^{-1}\in gZ(G)}$$ for all $x\in G$. 
We note that $xgx^{-1}=ygy^{-1}$ if and only if $xC_G(g)=yC_G(g)$, where $C_G(g)$ denotes the centralizer of $g$ in $G$.
Since $g\notin Z(G)$, we have $G\neq C_G(g)$.
I couldn't go any further.
Can someone help?

REPLY [7 votes]: Not only the statement that ”$G/Z(G)$ is trivial” is false, but a very important class of groups is defined by means of “repeated centers”. Let $G$ be a group and define
$$
Z_0(G)=\{1\},\qquad
Z_{k+1}(G)/Z_k(G)=Z(G/Z_{k}(G))\text{ for $k\ge0$}.
$$
In other words, $Z_{k+1}(G)$ is the inverse image of $Z(G/Z_{k}(G))$ under the canonical projection $G\to G/Z_{k}(G)$.
A group is called nilpotent if there is a $k$ such that $Z_k(G)=G$.
Nilpotent groups are abundant: for instance, every finite $p$-group is nilpotent because of the following lemma, whose easiest proof relies on the study of conjugacy classes.
Lemma. Every finite $p$-group $G\ne\{1\}$ has nontrivial center.