aspose file tools*
The moose likes Beginning Java and the fly likes incrimenting alphabet (getting next alphabet) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "incrimenting alphabet (getting next alphabet)" Watch "incrimenting alphabet (getting next alphabet)" New topic
Author

incrimenting alphabet (getting next alphabet)

biny panackal
Ranch Hand

Joined: Apr 12, 2007
Posts: 72
i am storing an alphabel on a talbe say my fist entry in table is "A"
now i am taking that value in my jsp in i have to update the "A" with "B", if it is "B" then to "C" ...
is there any way to incriment the data in jsp.. using java code..

String a="a";
a++;

like this .. hope you will help to get a solution..


Biny Balan
binypanackal@gmail.com
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

What will you do once you reach to Z ?

solution of your problem is very simple. declare your variable as char



Thanks,
Shailesh


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Try using a char variable instead of a String variable. You can increment that.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
Don't get me started about those stupid light bulbs.
 
subject: incrimenting alphabet (getting next alphabet)