File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes customer id = exactly 8 digits? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "customer id = exactly 8 digits?" Watch "customer id = exactly 8 digits?" New topic

customer id = exactly 8 digits?

Andy Jung
Ranch Hand

Joined: Feb 07, 2010
Posts: 150

my assignment (URLyBird 1.1.2) says that the customer id is "an 8 digit number".
Does this imply that only ids with exactly 8 digits should be accepted as valid ids?

In my current implementation a valid customer id consists of at least one up to a maximum of 8 digits.


Roel De Nijs

Joined: Jul 19, 2004
Posts: 8393

I think that's just your decision. In my application customer id must be exactly 8, otherwise a message is shown. That's why I stored it in a String and not an Integer But less than 8 digits will be fine too (I believe Roberto implemented it that way)

SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
Roberto Perillo

Joined: Dec 28, 2007
Posts: 2271

Roel De Nijs wrote:(I believe Roberto implemented it that way)


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
I agree. Here's the link:
subject: customer id = exactly 8 digits?
It's not a secret anymore!