Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to increment/decrement alphabet automatically?

807606Feb 5 2007 — edited Feb 5 2007
Hi all, I am new to java programming. I am trying to do a program where i had some char decleration like a.
char a;
Now if at all i say a++, it should be incremented to b i.e., the next letter should come. And after tht if i say a-, it should be back to a. I am not sure how to get this requirement done. Has it got anything that we need to do explicitly with ascii characters.

Thanks in advance...,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 5 2007
Added on Feb 5 2007
5 comments
1,125 views