import java.io.*; import java.lang.*; public class CharToASCII{ public static void main(String args[]) throws IOException{ BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the char:"); String str = buff.readLine(); for ( int i = 0; i < str.length(); ++i ){ char c = str.charAt(i); int j = (int) c; System.out.println("ASCII OF "+c +" = " + j + "."); } } }
(char)i
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)