|
Java™ by example!
|
|
|
How do I convert a char to an int?
eg.
char c = 'A'; int value = (char) c;
Following code demonstrates this. It prints out the ascii values of each letter in a sentence:
prints out:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|