Sign in using Google or Yahoo! id.  

Printing all printable ASCII chars with their code in Java

 Comments Share:   Twitter   Reddit   HackerNews   Facebook 
        // ASCII code starts from 0 to 127
        // This application does not print the 
        // unprintable ASCII characters. They are:
        //   0-32: Non-printable characters 
        //         like backspace (8), tab (9) and space (32)
        //   127: del


        final short start = 33;
        final short max = 127;
        for(short i=start; i < max; i++) {
            final char c = (char)i;
            System.out.println(i + "\t" + c);
        }
Posted on July 04, 2010 05:50 AM by Subhash Chandran
ascii encoding java
blog comments powered by Disqus