• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

incrimenting alphabet (getting next alphabet)

 
biny panackal
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What will you do once you reach to Z ?

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



Thanks,
Shailesh
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using a char variable instead of a String variable. You can increment that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic