Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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

Win a copy of The Software Craftsman this week in the Agile forum!
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: 6371

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: 2270

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
Have you tried LearnNowOnline?
subject: customer id = exactly 8 digits?