Posted: Thu Jul 21, 2005 8:16 pm Post subject: Java String from ASCII value
How do I create a string containing the character represented by an int ASCII value?
I've tried casting from int to char, but apparently that doesn't work.
ie.
x = 97;
System.out.println (ASCIIString(x)); //print 'a'
Sponsor Sponsor
Martin
Posted: Thu Jul 21, 2005 8:22 pm Post subject: (No subject)
Figured it out. Java is gross.
Conversion from an int to a String.
int x = 97;
System.out.println (((char) x) + "");
rizzix
Posted: Thu Jul 21, 2005 8:28 pm Post subject: (No subject)