[Java] Homework 21