Posted By

lowko0 on 05/26/11


Tagged

character array String ascii Value integer char long int short


Versions (?)

char to ASCII Value


 / Published in: Java
 

I hope it's well explained, chars are actually very easy, but sometimes it takes a while to understand them.

  1. int ascii = (int) regularChar;
  2.  
  3. // REMEBERING: CHARACTERS ARE ALREADY NUMBERS!
  4. // SUCH A FACT IS TRUE, THAT EVEN FOR SETTING THE CHAR MANUALLY
  5. // YOU CAN'T ENTER ANY SORT OF LITERAL CHARACTER. YOU NEED TO
  6. // ENTER IT'S ASCII VALUE, EVEN THOUGH IT DISPLAYS AS A CHARACTER.

Report this snippet  

You need to login to post a comment.