kitsune84
January 29th, 2004, 10:21 PM
Can it be done? Like, say I have: int num = 95; I want to use that to create a char containing the character that corresponds to that Unicode number. In this case, it would be 'a', which has a Unicode value of 95. If anyone could give me some info, I'd really appreciate it.
Magus
January 30th, 2004, 06:24 AM
I don't know if Java uses Unicode by default. If so, merely type-cast the int into a char.
dlorde
January 30th, 2004, 06:41 AM
Java uses UNICODE characters, so just cast your int to a char: int num = 95;
char ch = (char)num;
The generation of random numbers is too important to be left to chance...
R. Coveyou