Java Program To Find ASCII Value of A Character
Java Program To Find ASCII Value of A Character
char ch = 'a';
int ascii = ch;
// You can also cast char to int
int castAscii = (int) ch;
Output
Now, to find the ASCII value of ch , we just assign ch to an int variable ascii .
Internally, Java converts the character value to an ASCII value.