File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes incrementing characters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "incrementing characters" Watch "incrementing characters" New topic

incrementing characters

tom brownlee

Joined: Aug 14, 2001
Posts: 28
hi everyone...can anybody help?
how do you increment a 3 letter / 3 digit command line input so that it prints out the input and the next letter/digit in the sequence???and also the number of sequences left???
ie aaa000 = start of sequence, zzz999 = end of sequence.
eg input 'drg569' prints out 'drg569, drg 570, 17439920 left
( 26*26*26*10*10*10 )
(- 4*18* 7*5 * 6* 9)
( ----------------- )
( 17439920 )
also what about sfz999 to sga000???
any help???
Kaspar Dahlqvist
Ranch Hand

Joined: Jun 18, 2001
Posts: 128
This is probably a silly solution, but you might get it to work for you:

Hope this helps!
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
Please don't post the same question in multiple forums. It wastes the time of everyone who doesn't realize that a question has already been answered elsewhere. Putting all the answers in one place allows people to build on past answers rather than reinvent the wheel. I'm closing this thread - everyone please see the thread in Java in General (Intermediate) to follow up.

"I'm not back." - Bill Harding, Twister
subject: incrementing characters
It's not a secret anymore!