Tell don't ask in Java. Trying to use no if statements