Pls help me in solving this java question

Printable View