Topic awaiting preservation: Incrementing letters in JAVA (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: under your rug, |
posted 11-19-2003 09:00
If I take something like this, I get it to increment A > Z just fine but then it starts over with A instead of moving to AA then AB, AC, etc like most programming languages do. code: char x;
|
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 11-19-2003 09:31
This is a JavaScript forum, not a Java forum. quote:
|
Paranoid (IV) Inmate From: under your rug, |
posted 11-19-2003 10:25
Well there wasn't a forum for JAVA and this was as close as I could get code: $letter = 'a';
|
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 11-19-2003 12:34
The poster has demanded we remove all his contributions, less he takes legal action. |
Nervous Wreck (II) Inmate From: Indianapolis, In USA |
posted 11-19-2003 13:54
You'll need to start with en empty string for a base. |
Nervous Wreck (II) Inmate From: |
posted 11-20-2003 16:18
Why not just use an int for your counter and convert to string representation as needed? code: public class Test {
|