My professor gave us the following form of Dirichlet function as an example of the problems we faced in Riemann integration:
$\{r_{n}\}$ enumeration $\mathbb{Q} \cap [0,1]$
$$ f_{n}(x) = \begin{cases} 1 & \quad x \in \{r_{1}, ... , r_{n}\} \\ 0 & \quad \text{otherwise}. \end{cases} $$
And he said that: each $f_{n}$ is integrable but its limit is not integrable.
My questions are:
1- why each $f_{n}$ is integrable but its limit is not integrable?
2- How did Lebesgue integration solve this problem?
Could anyone help me understand answers to these questions, please?