Integer to an ASCII char
Author |
Message |
xHoly-Divinity
|
Posted: Tue Oct 02, 2007 4:38 pm Post subject: Integer to an ASCII char |
|
|
What is the command for converting an int, say 97, to a character, in this case 'a'. Thanks |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Saad
![](http://compsci.ca/v3/uploads/user_avatars/182387547249e7ebb91fb8a.png)
|
Posted: Tue Oct 02, 2007 4:49 pm Post subject: RE:Integer to an ASCII char |
|
|
Just cast it to char i.e. System.out.println((char) 97); |
|
|
|
|
![](images/spacer.gif) |
xHoly-Divinity
|
Posted: Tue Oct 02, 2007 4:52 pm Post subject: Re: Integer to an ASCII char |
|
|
Hehe, thanks ![Mr. Green Mr. Green](http://compsci.ca/v3/images/smiles/icon_mrgreen.gif) |
|
|
|
|
![](images/spacer.gif) |
|
|