|
Java™ by example!
|
|
|
How do I convert an int to a char?
eg.
int value = 65; // ascii for 'A' char c = (char) value;
Following code demonstrates this. It prints out an ascii table of printable characters.
Note that you may lose information converting a integer (four bytes) to a character (two bytes):
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|