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 c75d47a commit f1bd3b9Copy full SHA for f1bd3b9
ASCII value
@@ -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