Credit card validator in java