For each character we have predefined ASCII numbers: 

ASCII Table

Find ASCII Value of a character in Java

package JavaQuestions;
/**
 * 
 * @author NaveenKhunteta
 *
 */
public class AsciiChar {
public static void main(String[] args) {
char c = ‘a’; // 97
int ascii = c;
int asciiNumber = (int) c;
System.out.println(“ASCII value of “ + c + “:”+ ascii);
System.out.println(“ASCII value of “ + c + “:”+ asciiNumber);

}

}

Output is:

ASCII value of a:97

ASCII value of a:97