how to code this in java?

Printable View