Here is a JAVA Program to Show How to Display ASCII Code instead of Character.
class Char {
public static void main(String args[]) {
char ch1, ch2;
ch1 = 88; // code for X
ch2 = 'Y';
System.out.print("ch1 and ch2: ");
System.out.println(ch1 + " " + ch2);
}
}
/**************************
* ch1 and ch2: X Y
**************************/