Question2 in Java test where wrong, correcting