Can I do this with methods in Java?

Printable View