by Dinesh Thakur

step 1: Read a character

step 2: Cast it into byte and store in b

step 3: Print b

step 4: Exit

Here is the Java Example for the program ASCIIValue: 


public class ASCIIValue
public static void main(String args[])throws Exception
InputStreamReader is=new InputStreamReader(;
BufferedReader br=new BufferedReader(is);
System.out.println("Enter A character and Find Out The Ascii value");
byte b=(byte);

get Ascii value from character