21. (B) The algorithm finds the remainder when the sum of the first three digits of n is divided by 7. If this remainder is equal to the fourth digit, checkDigit, the method returns true, otherwise false. Note that (6+1+4) % 7 equals 4. Thus, only choice B is a valid number.