writing java code return the next character of string which the user input it ex : the input = tee the output = uff
Well, are you going to wrap from z to a and what about caps vs lower case?
yes from z to a ..their is no problem if it lower case or upper case
I am not sure what you mean by "their is no problem if it lower case or upper case" because to a computer they are completely different things. In Java, a char is basically an unsigned short. If you add one to it, it becomes the next letter. However, if you are on z or Z, it will become something that is not what you want. In those cases, you can just change it to a or A as needed with an if statement. Now, if you need it to be able to account for other things than just adding one, then it takes a bit more work.
Also, with youe example you will want to itterate the string. That means findinf the string length and then walking through it one character at a time. You can use string.length() and string.charAt() with a loop to do this.
Join our real-time social learning platform and learn together with your friends!