Example 6. Given the equation $x^{2}+(a-6) x+a=0$ ( $a$ $\neq 0$ ) with both roots being integers. Try to find the integer $a$. (1989, Sichuan Province Junior High School Mathematics Competition)
Let the two integer roots of the equation be \( y_{1} x_{1}, x_{2} \), and \( x_{1} \geqslant x_{2} \). By Vieta's formulas, we have
\[
\left\{\begin{array}{l}
x_{1}+x_{2}=6-a \\
x_{1} x_{2}=a
\end{array}\right.
\]

From (1) and (2), we get \( x_{1} x_{2} + x_{1} + x_{2} = 6 \), which simplifies to \( \left(x_{1}+1\right)\left(x_{2}+1\right)=7 \). Since \( a \neq 0 \), it follows that \( x_{1} \neq 0, x_{2} \neq 0 \). Thus, \( x_{1}=-2, x_{2}=-8 \). Therefore, \( a=16 \).