For function $\displaystyle f$ to be continuous at $\displaystyle a$, three conditions must be satisfied:

(1)$\displaystyle f$ is defined at $\displaystyle a$;

(2) $\displaystyle \lim_{x \to a} f(x)$ exists;

(3) $\displaystyle \lim_{x \to a} f(x)=f(a) $ exists;

Now say a function $\displaystyle g$ is defined as

$\displaystyle g(x) = \left \{\begin{array}{cc}0,&\mbox{if} x\not \in \mathbb{Z}\\1,&\mbox{if} x\in \mathbb{Z} \end{array}\right$.

Can we say $\displaystyle g$ is continuous $\displaystyle a$ where $\displaystyle a=2$ and $\displaystyle a \in \mathbb{Z}$?

Does $\displaystyle g$ satisfy the following?

(1)$\displaystyle f$ is defined at $\displaystyle a$ where $\displaystyle f(2)=1$;

(2) $\displaystyle \lim_{x \to a} f(x)$ exists;

(3) $\displaystyle \lim_{x \to a} f(x)=f(a)=0 $ exists

?