$31 \cdot 19$ The number of integer solutions to the equation $x^{2}-y^{2}=12$ is
(A) 2 pairs.
(B) 4 pairs.
(C) 8 pairs.
(D) 12 pairs.
(3rd "Jinyun Cup" Junior High School Mathematics Invitational, 1986)
[Solution] From the given, we have $(x+y)(x-y)=1 \cdot 12=3 \cdot 4=2 \cdot 6$. Also, $x+y$ and $x-y$ have the same parity, so we have
$$
\left\{\begin{array}{l}
x + y = 2, \\
x - y = 6;
\end{array} \text { or } \quad \left\{\begin{array}{l}
x+y=-2, \\
x-y=-6 ;
\end{array}\right.\right.
$$

or $\left\{\begin{array}{l}x+y=6, \\ x-y=2 ;\end{array}\right.$ or $\left\{\begin{array}{l}x+y=-6, \\ x-y=-2 .\end{array}\right.$
Solving these, we get $\left\{\begin{array}{l}x_{1}=4, \\ y_{1}=-2 ;\end{array}\left\{\begin{array}{l}x_{2}=-4, \\ y_{2}=2 ;\end{array}\left\{\begin{array}{l}x_{3}=4, \\ y_{3}=2 ;\end{array}\left\{\begin{array}{l}x_{4}=-4, \\ y_{4}=-2 .\end{array}\right.\right.\right.\right.$, a total of 4 solutions.
Therefore, the answer is $(B)$.