1// From Char to Ascii
2char character = 'a';
3int ascii = (int) character;
4
5// From Ascii to Char
6int ascii = 65;
7char character = (char) ascii;
1char character = name.charAt(0); // This gives the character 'a'
2int ascii = (int) character; // ascii is now 97.
1// From Char to Ascii
2char character = 'a';
3int ascii =character;
4 // Need not to specify
5// From Ascii to Char
6int ascii = 65;
7char character = ascii;