Have added
code tags to your post. Always use the tags: doesn't it look better
What you are showing doesn't look the same as what you said before.
If you are using a Scanner, avoid nextLine(). Use nextInt for the three numbers, but I thought you were entering a single
String "a123i". I can't understand how you turned that into "a1235". I thought you would be looking for the individual characters from the String, which is easy enough. There is no way to get an individual
char with a Scanner, because it was designed to deal with “tokens” rather than characters. The nearest is something like myScanner.next().charAt(0), but that will cause problems if you have something more than one letter long, because it will discard most of your input.
I don't think your adding numbers to the text will work. You are right that you can subtract 'a' from your letter (well done noticing that), but it won't work for 'A'. But if you have something like 'u', you will end up adding "21" to the text, which I am sure you don't want. What is more, you won't be able to distinguish that 21 from 21 from "ab" or "21" in the original text.
Make life easy for yourself. Don't try to do everything at once. Don't do everything in the
main method. Have one method for reading the String entered, one for getting the individual characters, maybe as a
char[], one for creating an
int[] from it, and one for doing the arithmetic. Write one method at a time and make sure it is working before you proceed to the next. You might be able to do the second and third things in one method. If you need to print an array for
testing, this is probably the easiest way to do it:-
System.out.println(Arrays.toString(myArray));
You have to import java.util.Arrays.