by Dinesh Thakur Category: Data Type

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

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.