Please help me with the code. I get Null Pointer Exception.Can't understand reason

Printable View