Consider the Hamiltonian $H = -\Delta + V$ where $V$ is the potential conrresponding to an infinite square well:
$$V(x) = \begin{cases}0,&\text{if } 0, \leq x \leq L;\\\infty,&\text{otherwise}.\end{cases}$$
We take
$$\mathcal{D}(H) = \{f\in H^2[0,L] : f(0) = f(L) = 0\}$$
so that $H$ is self-adjoint.
The corresponding eigenvalue problem is $H\psi = \lambda\psi$ for functions $\psi\in L^2[0,L]$, i.e.
$$-\frac{\operatorname d^2}{\operatorname dx^2}\psi = \lambda\psi.$$
The solutions are
$$\psi_n(x) = \sin\Big(\frac{\pi n}{L}x\Big),\quad\lambda_n = \frac{\pi^2n^2}{L^2}$$
so the point spectrum of $H$ is
$$\sigma_p(H) = \{\pi^2n^2/L^2 : n\in\Bbb N\}$$
Question Why is the point spectrum the whole spectrum in this case?
Notice that the eigenvectors $\{\psi_n\}_{n\in\Bbb N}$ form an orthogonal basis of $L^2[0,L]$. Hence, we can write any $f\in L^2[0,L]$ as a series
$$f = \sum_{n=1}^\infty \alpha_n\psi_n$$.
For any $\lambda \notin \sigma_p(H)$ we have
$$(H-\lambda\Bbb 1)f = \sum_{n=1}^\infty \alpha_n(\lambda_n-\lambda)\psi_n$$
So, as $\lambda \not=\lambda_n$,
$$(H-\lambda\Bbb 1)^{-1}f = \sum_{n=1}^\infty \alpha_n\frac{1}{(\lambda_n-\lambda)}\psi_n$$
As $1/(\lambda_n-\lambda) = L^2/(\pi^2n^2-L^2\lambda) \to 0$, the inverse operator is bounded. Hence, $\lambda$ cannot be in the continuous spectrum.
Since $H$ is self-adjoint, the residual spectrum is empty, so the point spectrum is the whole spectrum.