char character = name.charAt(0); // This gives the character 'a' int ascii = (int) character; // ascii is now 97.