Converting 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.

public class Main
{
   public static void main(String args[]) {
      for (int i=33; i<255; i++) {
         System.out.print(i + ":");
         char c = (char) i;
         System.out.print(c + "tt");
         if ((i % 4) == 0) System.out.println();
      }
   }
}

Note that you may lose information converting a integer (four bytes) to
a character (two bytes):

int value = 65535;
char c = (char) value;		// convert to char
System.out.println((int) c);    // back to int, prints out 65536 (limit for char)

int value = 65536;
char c = (char) value;          
System.out.println((int) c);    // prints out 0