This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
If your stringBuffer contained "Hello. My name is Inigo Montoya.", what would you increment this to?
Further, I don't think this is a well defined problem, especially since different character sets may not have letters in the same order, or consecutive letters stored as consecutive integers. And what would you increment a 'z' to?
Can you define the problem better? Tell us exactly what you want - or if this is a homework assignment, give us the EXACT and COMPLETE text of it, and we can perhaps steer you better.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors