Well done DT working out what the problem was. I missed it entirely, but there are several problems in this
thread. The confusion about casting is a completely separate problem.
As for having to declare and handle Exceptions, please read the appropriate
Java® Tutorials section. Note there is a section about “controversy”; I can show you sites giving a completely different opinion.