I have tried to convert a random number into a character.
If I type a number into a variable it works, but if I do this int number = (int)(Math.random()*10);
and then to assign it to a char and convert it char c = (char)number;
when I print it, it shows nothing without errors like an invisible character.
Could you help me to do this?
Aucun commentaire:
Enregistrer un commentaire