kurtulas
02-15-2008, 08:46 AM
Hi,
Any help with this would be appreciated.
I have created a method which will generate a random number using 'nextInt()' and imported 'java.util*;'. I need to cast this random number into an char but i can't seem to get it to work, my code in the method is:
char ch; int n; ch = (char); n = ch; return noise.nextInt(25) + 97;
Dont worry about 'noise' its just a variable i have assigned to the class.
Thanks alot, kurt.
Any help with this would be appreciated.
I have created a method which will generate a random number using 'nextInt()' and imported 'java.util*;'. I need to cast this random number into an char but i can't seem to get it to work, my code in the method is:
char ch; int n; ch = (char); n = ch; return noise.nextInt(25) + 97;
Dont worry about 'noise' its just a variable i have assigned to the class.
Thanks alot, kurt.