Showing posts with label Next Sequence Alphabetic Character. Show all posts
Showing posts with label Next Sequence Alphabetic Character. Show all posts

1/18/2013

Get Next Sequence Alphabetic Character


This method returns the next sequence Alphabetic Character,
Input should be single letter String from A to Y.

 public String getNextSequenceCharacter(String previousCharacter){
String nextSequenceChar="";
    int charValue=previousCharacter.charAt(0);
    nextSequenceChar=String.valueOf((char)(charValue+1));
            return nextSequenceChar;
}

Input: G
Output: H