please help convert this pseudo code to java

Printable View