Here is a JAVA Program to Show How to Display ASCII Code instead of Character.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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 **************************/ |