Tuesday, 13 December 2016

Java Program To Print ASCII Value Of Character

ASCII :- ASCII was developed from telegraph code. Its first commercial use was as a seven-bit teleprinter code promoted by Bell data services. Work on the ASCII standard began on October 6, 1960, with the first meeting of the American Standards Association's (ASA(now the American National Standards Institute or ANSI) X 3.2 subcommittee. The first edition of the standard was published in 1963
Full Form of ASCII Is ( American Standard Code for Information Interchange). Source Wikipedia

For ASCII Table Click Here  

NOTE:- Class name should be same as program name 

See Also :- C++ Program To Print ASCII Value Of Character

Solution :-

/* Program By Ghanendra Yadav
   Visit http://www.programmingwithbasics.com/
*/
import java.util.Scanner;
class ascii     //class name
{
    public static void main(String args[])
    {
int ascii;
char str='a';
ascii='a';
        
System.out.println("ASCII Value is: "+ascii);

    }
}

Output:-


Java Program To Print Ascii Value Of Character

No comments:
Write comments

Recommended Posts × +