you need to get the specific Character from the String first and then cast it.
char character = name.charAt(0); // This gives the character 'a'
int ascii = (int) character; // ascii is now 97.
On this page of the site you can watch the video online Converting String to ASCII in java with a duration of hours minute second in good quality, which was uploaded by the user Java with yogi 21 March 2015, share the link with friends and acquaintances, this video has already been watched 7,147 times on youtube and it was liked by 33 viewers. Enjoy your viewing!