NEET 05/17/2023 (Wed) 08:43 No.703742 del
(167.18 KB 849x458 java-trainer.gif)
>>703738
>Why would an empty value cause a null pointer though
The program does not know how to handle the input. It does not fit in the declared type of input and Java does the needful when that happens.

I recommend you seek a trainer to learn more about exceptions.