Can you do it again but in Java?