We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1061f92 commit cf3ead0Copy full SHA for cf3ead0
ascii.java
@@ -0,0 +1,14 @@
1
+ public class PrintAsciiValueExample1
2
+ {
3
+ public static void main(String[] args)
4
5
+ // character whose ASCII value to be found
6
+ char ch1 = 'a';
7
+ char ch2 = 'b';
8
+ // variable that stores the integer value of the character
9
+ int asciivalue1 = ch1;
10
+ int asciivalue2 = ch2;
11
+ System.out.println("The ASCII value of " + ch1 + " is: " + asciivalue1);
12
+ System.out.println("The ASCII value of " + ch2 + " is: " + asciivalue2);
13
+ }
14
0 commit comments