Tuesday, 5 February 2019

6.Write a Program to find ASCII values in java.


Description:
Write a sample code to find ASCII values in java.


Code:
?
1
2
3
4
5
6

public class ASCII_VALUE { public static void main(String[] args) { char ch='A'; int i=ch; System.out.println("Ascii Character---" + ch+"=="+i); } }

Output:
 Ascii Character---A==65

No comments:

Post a Comment