Re: Convert from int to char
- From: IchBin <weconsul@xxxxxxx>
- Date: Mon, 25 Sep 2006 19:37:46 -0400
Mocha_Java wrote:
Okay, so i have a dilemma. I have a int variable called rank thatRoedy has an online applet, on his website, that will let you select the from and to Object types and offer the available Java statement to do the conversion.
stores integers (obviously). however, i need to display these values as
chars in another method. casting dosent help because it just converts
the integer into the unicode character which isn't the same as the
number.
heres a snippet of the problem:
char r; // as you can see, its gets pretty
repetitive and boring
if (rank == 2)
r = '2';
if (rank == 3)
r = '3';
if (rank == 4)
r = '4';
....
return r;
is there a trick to make my int number the equivalent char number?
http://mindprod.com/applets/converter.html
You can also download it also.
--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
.
- References:
- Convert from int to char
- From: Mocha_Java
- Convert from int to char
- Prev by Date: Re: Convert from int to char
- Next by Date: Re: Convert from int to char
- Previous by thread: Re: Convert from int to char
- Next by thread: Re: Convert from int to char
- Index(es):
Relevant Pages
|