How do I increment a variable to the next or previous letter in the alphabet in Java?
Posted
by raleighJ
on Stack Overflow
See other posts from Stack Overflow
or by raleighJ
Published on 2010-05-24T18:30:33Z
Indexed on
2010/05/24
18:41 UTC
Read the original article
Hit count: 195
I'm relatively new to Java coding, and was looking for some help. I have a capital letter defined in a variable string, and I want to output the next and previous letters in the alphabet. For example, if the variable was equal to C, I would want to output B and D.
Thanks in advance for any help.
© Stack Overflow or respective owner