How to i solve this java senario??

Printable View